@storyous/features
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -26,2 +26,3 @@ 'use strict'; | ||
* onError?: Function | ||
* onDefinitionsChange?: Function | ||
* }} options | ||
@@ -58,3 +59,3 @@ * @param {FeatureDefinitions} [initialValue={}] | ||
*/ | ||
this._onError = options.onError; | ||
this._onError = options.onError || null; | ||
@@ -71,2 +72,7 @@ /** | ||
/** | ||
* @type {Function} | ||
*/ | ||
this._onDefinitionsChange = options.onDefinitionsChange || null; | ||
this._firstLoadPromise = this._loadDefinitionsRepetitively(); | ||
@@ -94,2 +100,5 @@ } | ||
_this._currentDefinitions = def; | ||
if (_this._onDefinitionsChange) { | ||
_this._onDefinitionsChange(def); | ||
} | ||
} | ||
@@ -96,0 +105,0 @@ if (typeof _this._cacheLifetime === 'number') { |
{ | ||
"name": "@storyous/features", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"main": "./dist/index.js", | ||
@@ -8,3 +8,3 @@ "scripts": { | ||
"test:coverage": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- --opts ./mocha.opts ./test", | ||
"test:coverage:threshold": "./node_modules/.bin/istanbul check --branches 90 --functions 90 --statements 90 --lines 90 ./coverage/coverage.json", | ||
"test:coverage:threshold": "./node_modules/.bin/istanbul check --branches 80 --functions 80 --statements 80 --lines 80 ./coverage/coverage.json", | ||
"test:backend": "./node_modules/mocha/bin/mocha --opts ./mocha.opts ./test ./src", | ||
@@ -11,0 +11,0 @@ "test:lint": "node ./node_modules/eslint/bin/eslint.js --ext .js src test *.js", |
@@ -22,2 +22,3 @@ 'use strict'; | ||
* onError?: Function | ||
* onDefinitionsChange?: Function | ||
* }} options | ||
@@ -51,3 +52,3 @@ * @param {FeatureDefinitions} [initialValue={}] | ||
*/ | ||
this._onError = options.onError; | ||
this._onError = options.onError || null; | ||
@@ -64,2 +65,7 @@ /** | ||
/** | ||
* @type {Function} | ||
*/ | ||
this._onDefinitionsChange = options.onDefinitionsChange || null; | ||
this._firstLoadPromise = this._loadDefinitionsRepetitively(); | ||
@@ -87,2 +93,5 @@ } | ||
this._currentDefinitions = def; | ||
if (this._onDefinitionsChange) { | ||
this._onDefinitionsChange(def); | ||
} | ||
} | ||
@@ -89,0 +98,0 @@ if (typeof this._cacheLifetime === 'number') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22133
525