Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "fn-compose", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "compose an arbitrary number of functions from right to left.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,7 +18,7 @@ fn-compose | ||
var compose = require('fn-compose'), | ||
add2 = function add2(a){ return a + 2 }, | ||
mul2 = function mul2(a){ return a * 2 }, | ||
sub1 = function sub1(a){ return a - 1 }, | ||
add2Sub1 = compose(sub1, add2); | ||
mul2Sub1 = compose(sub1, mul2); | ||
add2Sub1(5); //=> 6 | ||
mul2Sub1(5); //=> 9 | ||
@@ -25,0 +25,0 @@ ``` |
@@ -14,8 +14,8 @@ var test = require('tap').test, | ||
t.plan(1); | ||
var add = function add2(a){ return a + 2 }, | ||
var mul = function mul2(a){ return a * 2 }, | ||
sub = function sub1(a){ return a - 1 }, | ||
composed = compose(sub, add), | ||
composed = compose(sub, mul), | ||
result = composed(5); | ||
t.equals(result, 6); | ||
t.equals(result, 9); | ||
}); | ||
@@ -25,10 +25,10 @@ | ||
t.plan(1); | ||
var add = function add2(a){ return a + 2 }, | ||
var mul = function mul2(a){ return a * 2 }, | ||
sub = function sub1(a){ return a - 1 }, | ||
composed = compose(add, sub, add), | ||
composed = compose(mul, sub, mul), | ||
result = composed(5); | ||
t.equals(result, 8); | ||
t.equals(result, 18); | ||
}) | ||
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
2162