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

chance-generators

Package Overview
Dependencies
Maintainers
0
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 3.5.2 to 3.5.3

4

lib/PickoneGenerator.js

@@ -37,3 +37,3 @@ "use strict";

value: function shrink(item) {
if (this.lastUnwrappedValue === item && this.lastValue.shrink) {
if (this.lastUnwrappedValue === item && this.lastValue && this.lastValue.shrink) {
return this.lastValue.shrink(item);

@@ -47,3 +47,3 @@ } else {

value: function expand(item) {
var expandableItem = this.lastUnwrappedValue === item && this.lastValue.expand;
var expandableItem = this.lastUnwrappedValue === item && this.lastValue && this.lastValue.expand;

@@ -50,0 +50,0 @@ return new WeightedGenerator([[this, 10], [expandableItem ? this.lastValue.expand(item) : item, 15]]);

@@ -36,2 +36,6 @@ "use strict";

});
it("does not break when the generator emits falsy values", function () {
new PickoneGenerator([null]).shrink().first();
});
});

@@ -43,2 +47,6 @@

});
it("does not break when the generator emits falsy values", function () {
new PickoneGenerator([null]).expand().first();
});
});

@@ -45,0 +53,0 @@

{
"name": "chance-generators",
"description": "Random generators based on changejs",
"license": "MIT",
"author": "Sune Simonsen",
"license": "MIT",
"version": "3.5.2",
"version": "3.5.3",
"main": "lib/index.js",

@@ -20,3 +20,2 @@ "files": [

"test": "mocha ./documentation/**/*.md ./src/**/*.js ./test/**/*.js",
"travis": "npm run lint && npm run coverage && npm run build",
"update-examples": "generate-site --require ./bootstrap-unexpected-markdown.js --update-examples",

@@ -36,3 +35,3 @@ "postversion": "npm run changelog && git add CHANGELOG.md && git commit --allow-empty -m 'Update changelog' && deploy-site.sh"

"eslint": "^3.19.0",
"eslint-config-pretty-standard": "^0.2.2",
"eslint-config-pretty-standard": "^1.0.0",
"imocha": "^0.3.0",

@@ -47,3 +46,3 @@ "istanbul": "^0.4.2",

"prettier-package-json": "^1.4.0",
"serve": "^9.4.2",
"serve": "^13.0.2",
"unexpected": "^10.37.1",

@@ -57,17 +56,3 @@ "unexpected-documentation-site-generator": "^4.6.1",

"testing"
],
"lint-staged": {
"linters": {
"*.js": [
"eslint",
"prettier --write",
"git add"
],
"package.json": [
"prettier-package-json --write",
"git add"
]
}
},
"pre-commit": "lint-staged"
]
}
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