Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chance-generators

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chance-generators - npm Package Compare versions

Comparing version 2.13.0 to 2.13.1

30

lib/chance-generators.js

@@ -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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc