Comparing version 0.9.0 to 0.10.0
@@ -10,3 +10,3 @@ /** | ||
* @param {*} b - any value | ||
* @return {boolean} a && b | ||
* @return {*} a && b | ||
*/ | ||
@@ -17,2 +17,2 @@ module.exports = and; | ||
return a && b; | ||
} | ||
} |
/** | ||
* @module 101/and | ||
* @module 101/or | ||
*/ | ||
@@ -7,6 +7,6 @@ | ||
* Functional version of || | ||
* @function module:101/and | ||
* @function module:101/or | ||
* @param {*} a - any value | ||
* @param {*} b - any value | ||
* @return {boolean} a || b | ||
* @return {*} a || b | ||
*/ | ||
@@ -18,2 +18,2 @@ | ||
return a || b; | ||
} | ||
} |
{ | ||
"name": "101", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "common javascript utils that can be required selectively that assume es5+", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,3 +25,3 @@ ![101](http://i.imgur.com/MFrmMt6.png) | ||
themselves constantly updating their package.json (repeatedly adding and removing the same micro-modules). | ||
* Unbundling micro-modules can lead to projects with 100's of dependencies which can be tedious to maintain. | ||
* Unbundling micro-modules can lead to projects with hundreds of dependencies which can be tedious to maintain. | ||
@@ -59,2 +59,3 @@ | ||
and(true, true); // true | ||
and(true, "foo"); // "foo" | ||
``` | ||
@@ -98,2 +99,19 @@ | ||
## converge | ||
Converges an array of functions into one. Works great with `compose`. | ||
```js | ||
var converge = require('101/converge'); | ||
converge(mul, [add, sub])(6, 2); // mul(add(6, 2), sub(6, 2)) // (6+2) * (6-2) = 36 | ||
[ {a: true, b: false} | ||
, {a: false, b: false} | ||
, {a: true, b: true} | ||
].filter(converge(and , [pluck("a") , pluck("b")])); // [{a: true, b: true}] | ||
[f, converge(g, [h, i]), j].reduce(compose); // f(g(h(j), i(j))) | ||
``` | ||
## envIs | ||
@@ -371,2 +389,3 @@ | ||
or(false, false); // false | ||
or("foo", false); // "foo" | ||
``` | ||
@@ -471,4 +490,18 @@ | ||
## xor | ||
Exclusive or | ||
Works great with `array.reduce`. | ||
```js | ||
var xor = require('101/xor'); | ||
xor(true, true); // false | ||
xor(true, false); // true | ||
xor(false, true); // true | ||
xor(false, false); // false | ||
``` | ||
## License | ||
MIT |
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
82661
74
2394
503