chance-generators
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -16,15 +16,22 @@ "use strict"; | ||
var getMagicValuesSet = function getMagicValuesSet() { | ||
return (typeof global === "undefined" ? "undefined" : _typeof(global)) === "object" && global.recordLocation && global.recordLocation.magicValues; | ||
}; | ||
var getMagicValues = function getMagicValues() { | ||
return (typeof global === "undefined" ? "undefined" : _typeof(global)) === "object" && global.recordLocation && global.recordLocation.magicValues || []; | ||
var magicValuesSet = getMagicValuesSet(); | ||
return magicValuesSet && Array.from(magicValuesSet) || []; | ||
}; | ||
var invalidateCacheIfNecessary = function invalidateCacheIfNecessary() { | ||
var magicValues = getMagicValues(); | ||
var isCacheInvalid = cacheBase.size !== magicValues.length || cacheBase.magicValues !== magicValues; | ||
var magicValuesSet = getMagicValuesSet(); | ||
var isCacheInvalid = !magicValuesSet || cacheBase.size !== magicValuesSet.size || cacheBase.magicValuesSet !== magicValuesSet; | ||
if (isCacheInvalid) { | ||
cache = {}; | ||
cacheBase = { | ||
magicValues: magicValues, | ||
size: magicValues.length | ||
magicValuesSet: magicValuesSet, | ||
size: magicValuesSet ? magicValuesSet.size : 0 | ||
}; | ||
@@ -31,0 +38,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"main": "lib/index.js", | ||
@@ -33,2 +33,3 @@ "files": [ | ||
"eslint-config-pretty-standard": "0.2.2", | ||
"imocha": "0.3.0", | ||
"istanbul": "0.4.2", | ||
@@ -41,3 +42,3 @@ "javascript-state-machine": "2.3.5", | ||
"prettier-package-json": "1.4.0", | ||
"serve": "6.5.8", | ||
"serve": "9.4.2", | ||
"unexpected": "10.37.1", | ||
@@ -44,0 +45,0 @@ "unexpected-documentation-site-generator": "4.6.1", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
161527
21
55
3187