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

chance-generators

Package Overview
Dependencies
Maintainers
1
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 1.5.0 to 1.6.0

14

lib/chance-generators.js

@@ -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) {

4

package.json
{
"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": {

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