chance-generators
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -119,3 +119,13 @@ /*global define*/ | ||
pick: function (generator, data) { | ||
if (!Array.isArray(data) || data.length === 0) { | ||
if (Array.isArray(data)) { | ||
return shrinkers.pickset(generator, data) | ||
} else { | ||
return shrinkers.pickone(generator, data) | ||
} | ||
}, | ||
pickone: function (generator, data) { | ||
return that.identity(data) | ||
}, | ||
pickset: function (generator, data) { | ||
if (data.length === 0) { | ||
return that.identity(data) | ||
@@ -129,3 +139,3 @@ } | ||
return createGenerator('pick', [data, count]) | ||
return createGenerator('pickset', [data, count]) | ||
}, | ||
@@ -132,0 +142,0 @@ unique: function (generator, data) { |
{ | ||
"name": "chance-generators", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "Random generators based on changejs", | ||
@@ -18,3 +18,3 @@ "main": "lib/chance-generators.js", | ||
"dependencies": { | ||
"chance": "0.8.0" | ||
"chance": "1.0.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
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
19133
385
+ Addedchance@1.0.1(transitive)
- Removedchance@0.8.0(transitive)
Updatedchance@1.0.1