update dependencies to latest standards
This commit is contained in:
parent
efa818680a
commit
e73e704886
@ -21,7 +21,7 @@ store things about your environment and let them travel across modules
|
||||
Install the package through npm
|
||||
|
||||
```
|
||||
npm install smartenv
|
||||
npm install smartenv --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
7
dist/index.d.ts
vendored
7
dist/index.d.ts
vendored
@ -1,4 +1,3 @@
|
||||
import * as classes from './smartenv.classes';
|
||||
export declare let getEnv: () => classes.Environment;
|
||||
export declare let printEnv: () => void;
|
||||
export declare let obs: any;
|
||||
import { getEnv, printEnv } from './smartenv.environment';
|
||||
import { obs } from './smartenv.objectstorage';
|
||||
export { getEnv, printEnv, obs };
|
||||
|
13
dist/index.js
vendored
13
dist/index.js
vendored
@ -1,7 +1,8 @@
|
||||
"use strict";
|
||||
const SmartenvEnvironment = require("./smartenv.environment");
|
||||
const SmartenvObjectstorage = require("./smartenv.objectstorage");
|
||||
exports.getEnv = SmartenvEnvironment.getEnv;
|
||||
exports.printEnv = SmartenvEnvironment.printEnv;
|
||||
exports.obs = SmartenvObjectstorage.obs;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEsOERBQTZEO0FBQzdELGtFQUFpRTtBQUV0RCxRQUFBLE1BQU0sR0FBRyxtQkFBbUIsQ0FBQyxNQUFNLENBQUE7QUFDbkMsUUFBQSxRQUFRLEdBQUcsbUJBQW1CLENBQUMsUUFBUSxDQUFBO0FBQ3ZDLFFBQUEsR0FBRyxHQUFHLHFCQUFxQixDQUFDLEdBQUcsQ0FBQSJ9
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const smartenv_environment_1 = require("./smartenv.environment");
|
||||
exports.getEnv = smartenv_environment_1.getEnv;
|
||||
exports.printEnv = smartenv_environment_1.printEnv;
|
||||
const smartenv_objectstorage_1 = require("./smartenv.objectstorage");
|
||||
exports.obs = smartenv_objectstorage_1.obs;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLGlFQUF1RDtBQUtyRCxpQkFMTSw2QkFBTSxDQUtOO0FBQ04sbUJBTmMsK0JBQVEsQ0FNZDtBQUxWLHFFQUE4QztBQU01QyxjQU5PLDRCQUFHLENBTVAifQ==
|
16
dist/smartenv.classes.helpers.d.ts
vendored
16
dist/smartenv.classes.helpers.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
export declare var getEnvString: () => string;
|
||||
export declare var getUserAgentString: () => string;
|
||||
export declare var isNode: () => boolean;
|
||||
export declare var getNodeVersion: () => string;
|
||||
export declare var isBrowser: () => boolean;
|
||||
export declare var isCI: () => boolean;
|
||||
export declare var isC9: () => boolean;
|
||||
export declare var isTravis: () => boolean;
|
||||
export declare let getEnvString: () => string;
|
||||
export declare let getUserAgentString: () => string;
|
||||
export declare let isNode: () => boolean;
|
||||
export declare let getNodeVersion: () => string;
|
||||
export declare let isBrowser: () => boolean;
|
||||
export declare let isCI: () => boolean;
|
||||
export declare let isC9: () => boolean;
|
||||
export declare let isTravis: () => boolean;
|
||||
|
3
dist/smartenv.classes.helpers.js
vendored
3
dist/smartenv.classes.helpers.js
vendored
@ -1,4 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getEnvString = function () {
|
||||
if (typeof window !== 'undefined') {
|
||||
return 'browser';
|
||||
@ -50,4 +51,4 @@ exports.isTravis = function () {
|
||||
}
|
||||
;
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuY2xhc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CLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztRQUM1QixNQUFNLENBQUMsSUFBSSxDQUFBO0lBQ2IsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ04sTUFBTSxDQUFDLEtBQUssQ0FBQTtJQUNkLENBQUM7QUFDSCxDQUFDLENBQUE7QUFFVSxRQUFBLFFBQVEsR0FBRztJQUNwQixFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7UUFDdkIsTUFBTSxDQUFDLElBQUksQ0FBQTtJQUNiLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNOLE1BQU0sQ0FBQyxLQUFLLENBQUE7SUFDZCxDQUFDO0lBQUEsQ0FBQztBQUNKLENBQUMsQ0FBQSJ9
|
3
dist/smartenv.classes.js
vendored
3
dist/smartenv.classes.js
vendored
@ -1,4 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const helpers = require("./smartenv.classes.helpers");
|
||||
class Environment {
|
||||
constructor() {
|
||||
@ -14,4 +15,4 @@ class Environment {
|
||||
;
|
||||
}
|
||||
exports.Environment = Environment;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuY2xhc3Nlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LmNsYXNzZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHNEQUFzRDtBQUV0RDtJQVNJO1FBQ0ksSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsWUFBWSxFQUFFLENBQUE7UUFDeEMsSUFBSSxDQUFDLFNBQVMsR0FBRyxPQUFPLENBQUMsU0FBUyxFQUFFLENBQUE7UUFD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UFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxFQUFFLENBQUE7UUFDMUIsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUMsUUFBUSxFQUFFLENBQUE7UUFDbEMsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSSxFQUFFLENBQUE7SUFDOUIsQ0FBQztJQUFBLENBQUM7Q0FDTDtBQW5CRCxrQ0FtQkMifQ==
|
3
dist/smartenv.environment.js
vendored
3
dist/smartenv.environment.js
vendored
@ -1,4 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const classes = require("./smartenv.classes");
|
||||
const objectStorage = require("./smartenv.objectstorage");
|
||||
let environment;
|
||||
@ -31,4 +32,4 @@ exports.printEnv = function () {
|
||||
console.log('the smartenv registration store currently holds the following properties:');
|
||||
console.log(Object.getOwnPropertyNames(objectStorage.obs.getAll()));
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYuZW52aXJvbm1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGVudi5lbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBSUEsOENBQTZDO0FBQzdDLDBEQUF5RDtBQUd6RCxJQUFJLFdBQWdDLENBQUE7QUFDcEMsSUFBSSxhQUFhLEdBQVksS0FBSyxDQUFBO0FBRWxDOzs7R0FHRztBQUNRLFFBQUEsTUFBTSxHQUFHO0lBQ2hCLEVBQUUsQ0FBQyxDQUFDLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztRQUNqQixXQUFXLEdBQUcsSUFBSSxPQUFPLENBQUMsV0FBVyxFQUFFLENBQUE7UUFDdkMsYUFBYSxHQUFHLElBQUksQ0FBQSxDQUFDLG1DQUFtQztJQUM1RCxDQUFDO0lBQUEsQ0FBQ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BQ0QsT0FBTyxDQUFDLEdBQUcsQ0FBQywyRUFBMkUsQ0FBQyxDQUFBO0lBQ3hGLE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLG1CQUFtQixDQUFDLGFBQWEsQ0FBQyxHQUFHLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFBO0FBQ3ZFLENBQUMsQ0FBQSJ9
|
7
dist/smartenv.objectstorage.d.ts
vendored
7
dist/smartenv.objectstorage.d.ts
vendored
@ -1,2 +1,5 @@
|
||||
export declare var obs: any;
|
||||
export declare var obsItems: any;
|
||||
export declare let obsItems: any;
|
||||
/**
|
||||
* Objectstorage allows easy sharing of objects within node
|
||||
*/
|
||||
export declare let obs: any;
|
||||
|
12
dist/smartenv.objectstorage.js
vendored
12
dist/smartenv.objectstorage.js
vendored
@ -1,5 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = require("./smartenv.plugins");
|
||||
exports.obsItems = {};
|
||||
/**
|
||||
* Objectstorage allows easy sharing of objects within node
|
||||
*/
|
||||
exports.obs = {
|
||||
add: function (paramNameArg = 'undefined', objectArg = 'undefined') {
|
||||
if (paramNameArg === 'undefined') {
|
||||
@ -22,7 +27,7 @@ exports.obs = {
|
||||
},
|
||||
merge: function (paramNameArg, objectArg) {
|
||||
if (!(typeof exports.obsItems[paramNameArg] === 'undefined')) {
|
||||
exports.obsItems[paramNameArg] = plugins._.assign(exports.obsItems[paramNameArg], objectArg);
|
||||
exports.obsItems[paramNameArg] = plugins.lodash.assign(exports.obsItems[paramNameArg], objectArg);
|
||||
}
|
||||
else {
|
||||
console.log('object is not present, so there is nothing to merge');
|
||||
@ -35,9 +40,8 @@ exports.obs = {
|
||||
return exports.obsItems;
|
||||
},
|
||||
addComplete: function (itemsArg) {
|
||||
exports.obsItems = plugins._.assign(exports.obsItems, itemsArg);
|
||||
exports.obsItems = plugins.lodash.assign(exports.obsItems, itemsArg);
|
||||
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UFVLFlBQVksRUFBRSxTQUFTO1FBQ3RDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLGdCQUFRLENBQUUsWUFBWSxDQUFFLEtBQUssV0FBVyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ3ZELGdCQUFRLENBQUUsWUFBWSxDQUFFLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsZ0JBQVEsQ0FBRSxZQUFZLENBQUUsRUFBRSxTQUFTLENBQUMsQ0FBQTtRQUN2RixDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDTixPQUFPLENBQUMsR0FBRyxDQUFDLHFEQUFxRCxDQUFDLENBQUE7UUFDcEUsQ0FBQztJQUNILENBQUM7SUFDRCxHQUFHLEVBQUUsVUFBVSxPQUFPO1FBQ3BCLE1BQU0sQ0FBQyxnQkFBUSxDQUFFLE9BQU8sQ0FBRSxDQUFBO0lBQzVCLENBQUM7SUFDRCxNQUFNLEVBQUU7UUFDTixNQUFNLENBQUMsZ0JBQVEsQ0FBQTtJQUNqQixDQUFDO0lBQ0QsV0FBVyxFQUFFLFVBQVUsUUFBUTtRQUM3QixnQkFBUSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLGdCQUFRLEVBQUUsUUFBUSxDQUFDLENBQUE7UUFDcEQsTUFBTSxDQUFDLGdCQUFRLENBQUE7SUFDakIsQ0FBQztDQUNGLENBQUEifQ==
|
6
dist/smartenv.plugins.d.ts
vendored
6
dist/smartenv.plugins.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import 'typings-global';
|
||||
import * as Q from 'q';
|
||||
import * as _ from 'lodash';
|
||||
export { Q, _ };
|
||||
import * as smartq from 'smartq';
|
||||
import * as lodash from 'lodash';
|
||||
export { smartq, lodash };
|
||||
|
11
dist/smartenv.plugins.js
vendored
11
dist/smartenv.plugins.js
vendored
@ -1,7 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
const Q = require("q");
|
||||
exports.Q = Q;
|
||||
const _ = require("lodash");
|
||||
exports._ = _;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2Qix1QkFBc0I7QUFJbEIsY0FBQztBQUhMLDRCQUEyQjtBQUl2QixjQUFDIn0=
|
||||
const smartq = require("smartq");
|
||||
exports.smartq = smartq;
|
||||
const lodash = require("lodash");
|
||||
exports.lodash = lodash;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlbnYucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZW52LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFDdkIsaUNBQWdDO0FBSTVCLHdCQUFNO0FBSFYsaUNBQWdDO0FBSTVCLHdCQUFNIn0=
|
10
package.json
10
package.json
@ -22,14 +22,12 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/smartenv",
|
||||
"dependencies": {
|
||||
"@types/q": "0.x.x",
|
||||
"lodash": "^4.17.2",
|
||||
"q": "^1.4.1",
|
||||
"lodash": "^4.17.4",
|
||||
"smartq": "^1.1.1",
|
||||
"typings-global": "^1.0.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/should": "^8.1.30",
|
||||
"beautylog": "^6.0.0",
|
||||
"should": "^11.1.1"
|
||||
"beautylog": "^6.1.5",
|
||||
"tapbundle": "^1.0.5"
|
||||
}
|
||||
}
|
||||
|
0
test/test.d.ts
vendored
0
test/test.d.ts
vendored
21
test/test.js
21
test/test.js
@ -1,21 +0,0 @@
|
||||
"use strict";
|
||||
const smartenv = require("../dist/index.js");
|
||||
const beautylog = require("beautylog");
|
||||
smartenv.printEnv();
|
||||
// test smartenv.obs.add
|
||||
smartenv.obs.add('myTestObject', { key1: 'Peter' });
|
||||
smartenv.obs.add('myTestObject', { key1: 'Klaus' }); // now trying to add a second
|
||||
smartenv.printEnv();
|
||||
beautylog.log(smartenv.obs.get('myTestObject').key1); // this should be Peter
|
||||
// test smartenv.obs.replace
|
||||
smartenv.obs.replace('myTestObject', { key1: 'Klaus' });
|
||||
beautylog.log(smartenv.obs.get('myTestObject').key1); // this should be Klaus
|
||||
// test smartenv.obs.merge
|
||||
smartenv.obs.merge('myTestObject', { key2: 'Peter' });
|
||||
beautylog.log(smartenv.obs.get('myTestObject').key1 + smartenv.obs.get('myTestObject').key2);
|
||||
// this should be KlausPeter
|
||||
let key2 = 'hello';
|
||||
smartenv.obs.get('myTestObject').key2 = key2;
|
||||
beautylog.log(smartenv.obs.get('myTestObject').key2);
|
||||
beautylog.success('Success!');
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDZDQUE0QztBQUM1Qyx1Q0FBc0M7QUFDdEMsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFBO0FBRW5CLHdCQUF3QjtBQUN4QixRQUFRLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxjQUFjLEVBQUMsRUFBQyxJQUFJLEVBQUMsT0FBTyxFQUFDLENBQUMsQ0FBQTtBQUMvQyxRQUFRLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxjQUFjLEVBQUMsRUFBQyxJQUFJLEVBQUMsT0FBTyxFQUFD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A4B;AAE1H,IAAI,IAAI,GAAG,OAAO,CAAC;AACnB,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AAC7C,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC;AAErD,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
@ -1,5 +1,8 @@
|
||||
import * as smartenv from '../dist/index.js'
|
||||
import * as beautylog from 'beautylog'
|
||||
|
||||
import { tap, expect } from 'tapbundle'
|
||||
|
||||
smartenv.printEnv()
|
||||
|
||||
// test smartenv.obs.add
|
||||
|
16
ts/index.ts
16
ts/index.ts
@ -1,8 +1,10 @@
|
||||
import * as plugins from './smartenv.plugins'
|
||||
import * as classes from './smartenv.classes'
|
||||
import * as SmartenvEnvironment from './smartenv.environment'
|
||||
import * as SmartenvObjectstorage from './smartenv.objectstorage'
|
||||
|
||||
export let getEnv = SmartenvEnvironment.getEnv
|
||||
export let printEnv = SmartenvEnvironment.printEnv
|
||||
export let obs = SmartenvObjectstorage.obs
|
||||
import {getEnv, printEnv} from './smartenv.environment'
|
||||
import { obs } from './smartenv.objectstorage'
|
||||
|
||||
|
||||
export {
|
||||
getEnv,
|
||||
printEnv,
|
||||
obs
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
export var getEnvString = function(): string {
|
||||
import * as plugins from './smartenv.plugins'
|
||||
export let getEnvString = function (): string {
|
||||
if (typeof window !== 'undefined') {
|
||||
return 'browser'
|
||||
} else if (typeof process !== 'undefined') {
|
||||
@ -6,7 +7,7 @@ export var getEnvString = function(): string {
|
||||
}
|
||||
}
|
||||
|
||||
export var getUserAgentString = function(): string{
|
||||
export let getUserAgentString = function (): string {
|
||||
if (isBrowser()) {
|
||||
return navigator.userAgent
|
||||
} else {
|
||||
@ -14,19 +15,19 @@ export var getUserAgentString = function(): string{
|
||||
}
|
||||
}
|
||||
|
||||
export var isNode = function(): boolean {
|
||||
export let isNode = function (): boolean {
|
||||
return getEnvString() === 'node'
|
||||
}
|
||||
|
||||
export var getNodeVersion = function(): string {
|
||||
export let getNodeVersion = function (): string {
|
||||
return process.version
|
||||
}
|
||||
|
||||
export var isBrowser = function(): boolean {
|
||||
export let isBrowser = function (): boolean {
|
||||
return !isNode()
|
||||
}
|
||||
|
||||
export var isCI = function(){
|
||||
export let isCI = function () {
|
||||
if (process.env.CI) {
|
||||
return true
|
||||
} else {
|
||||
@ -34,7 +35,7 @@ export var isCI = function(){
|
||||
};
|
||||
}
|
||||
|
||||
export var isC9 = function(){
|
||||
export let isC9 = function () {
|
||||
if (process.env.C9_HOSTNAME) {
|
||||
return true
|
||||
} else {
|
||||
@ -42,7 +43,7 @@ export var isC9 = function(){
|
||||
}
|
||||
}
|
||||
|
||||
export var isTravis = function(){
|
||||
export let isTravis = function () {
|
||||
if (process.env.TRAVIS) {
|
||||
return true
|
||||
} else {
|
||||
|
@ -1,6 +1,12 @@
|
||||
import plugins = require('./smartenv.plugins')
|
||||
export var obs: any = {
|
||||
add: function(paramNameArg = 'undefined',objectArg = 'undefined') {
|
||||
|
||||
export let obsItems: any = {}
|
||||
|
||||
/**
|
||||
* Objectstorage allows easy sharing of objects within node
|
||||
*/
|
||||
export let obs: any = {
|
||||
add: function (paramNameArg = 'undefined', objectArg = 'undefined') {
|
||||
if (paramNameArg === 'undefined') {
|
||||
console.log('paramName is undefined')
|
||||
return
|
||||
@ -8,32 +14,31 @@ export var obs: any = {
|
||||
if (objectArg === 'undefined') {
|
||||
console.log('objectArg is undefined')
|
||||
}
|
||||
if (typeof obsItems[paramNameArg] === 'undefined') {
|
||||
obsItems[paramNameArg] = objectArg
|
||||
if (typeof obsItems[ paramNameArg ] === 'undefined') {
|
||||
obsItems[ paramNameArg ] = objectArg
|
||||
} else {
|
||||
console.log('object is already present, so add operation has failed.')
|
||||
}
|
||||
return obsItems[paramNameArg]
|
||||
return obsItems[ paramNameArg ]
|
||||
},
|
||||
replace: function(paramNameArg,objectArg){
|
||||
obsItems[paramNameArg] = objectArg
|
||||
replace: function (paramNameArg, objectArg) {
|
||||
obsItems[ paramNameArg ] = objectArg
|
||||
},
|
||||
merge: function(paramNameArg,objectArg){
|
||||
if (!(typeof obsItems[paramNameArg] === 'undefined')) {
|
||||
obsItems[paramNameArg] = plugins._.assign(obsItems[paramNameArg],objectArg)
|
||||
merge: function (paramNameArg, objectArg) {
|
||||
if (!(typeof obsItems[ paramNameArg ] === 'undefined')) {
|
||||
obsItems[ paramNameArg ] = plugins.lodash.assign(obsItems[ paramNameArg ], objectArg)
|
||||
} else {
|
||||
console.log('object is not present, so there is nothing to merge')
|
||||
}
|
||||
},
|
||||
get: function(keyName) {
|
||||
return obsItems[keyName]
|
||||
get: function (keyName) {
|
||||
return obsItems[ keyName ]
|
||||
},
|
||||
getAll: function () {
|
||||
return obsItems
|
||||
},
|
||||
addComplete: function(itemsArg) {
|
||||
obsItems = plugins._.assign(obsItems,itemsArg)
|
||||
addComplete: function (itemsArg) {
|
||||
obsItems = plugins.lodash.assign(obsItems, itemsArg)
|
||||
return obsItems
|
||||
}
|
||||
}
|
||||
export var obsItems: any = {}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import 'typings-global'
|
||||
import * as Q from 'q'
|
||||
import * as _ from 'lodash'
|
||||
import * as smartq from 'smartq'
|
||||
import * as lodash from 'lodash'
|
||||
|
||||
export {
|
||||
Q,
|
||||
_
|
||||
smartq,
|
||||
lodash
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user