chance-generators
Advanced tools
Comparing version 2.13.0 to 2.13.1
@@ -87,23 +87,23 @@ "use strict"; | ||
that.chance = typeof seed === "undefined" ? new Chance() : new Chance(seed); | ||
}; | ||
that.reset(); | ||
// Fix that pick provided a count of zero or one does not return an array | ||
var originalPick = Chance.prototype.pick; | ||
that.chance.pick = function (array, count) { | ||
if (count === 0) { | ||
return []; | ||
} | ||
// Fix that pick provided a count of zero or one does not return an array | ||
var originalPick = Chance.prototype.pick; | ||
that.chance.pick = function (array, count) { | ||
if (count === 0) { | ||
return []; | ||
} | ||
if (count === 1) { | ||
return [originalPick.call(that.chance, array, count)]; | ||
} | ||
if (count === 1) { | ||
return [originalPick.call(that.chance, array, count)]; | ||
} | ||
return originalPick.call(that.chance, array, count); | ||
}; | ||
return originalPick.call(that.chance, array, count); | ||
that.chance.shape = function (data) { | ||
return unwrap(data); | ||
}; | ||
}; | ||
that.chance.shape = function (data) { | ||
return unwrap(data); | ||
}; | ||
that.reset(); | ||
@@ -110,0 +110,0 @@ function generatorFunction(name, args, f) { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "2.13.0", | ||
"version": "2.13.1", | ||
"main": "lib/chance-generators.js", | ||
@@ -9,0 +9,0 @@ "files": [ |
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
28171