effects-as-data
Advanced tools
Comparing version 2.5.7 to 2.5.8
@@ -70,2 +70,16 @@ 'use strict'; | ||
test('testFn should handle undefined returns for semantic test', testFn(regeneratorRuntime.mark(function _callee() { | ||
return regeneratorRuntime.wrap(function _callee$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
case 'end': | ||
return _context3.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
}), function () { | ||
return args().returns(); | ||
})); | ||
test('testFn should curry', testFn(basic)(function () { | ||
@@ -72,0 +86,0 @@ // prettier-ignore |
@@ -123,22 +123,28 @@ 'use strict'; | ||
var yieldCmd = curry(function (t, v) { | ||
t[t.length - 1][1] = v; | ||
return { | ||
yieldReturns: yieldReturns(t) | ||
var yieldCmd = function yieldCmd(t) { | ||
return function (v) { | ||
t[t.length - 1][1] = v; | ||
return { | ||
yieldReturns: yieldReturns(t) | ||
}; | ||
}; | ||
}); | ||
}; | ||
var yieldReturns = curry(function (t, v) { | ||
t[t.length] = [v]; | ||
var yieldReturns = function yieldReturns(t) { | ||
return function (v) { | ||
t[t.length] = [v]; | ||
return { | ||
yieldCmd: yieldCmd(t), | ||
returns: returns(t) | ||
return { | ||
yieldCmd: yieldCmd(t), | ||
returns: returns(t) | ||
}; | ||
}; | ||
}); | ||
}; | ||
var returns = curry(function (t, a) { | ||
t[t.length - 1][1] = a; | ||
return t; | ||
}); | ||
var returns = function returns(t) { | ||
return function (a) { | ||
t[t.length - 1][1] = a; | ||
return t; | ||
}; | ||
}; | ||
@@ -145,0 +151,0 @@ // Modified tuples |
{ | ||
"name": "effects-as-data", | ||
"version": "2.5.7", | ||
"version": "2.5.8", | ||
"description": "Express async workflows using pure functions.", | ||
@@ -14,3 +14,3 @@ "main": "src/index.js", | ||
"transpile": "babel src --out-dir es5 --source-maps", | ||
"deploy": "npm run transpile && npm test && npm publish --tag beta; rm -rf es5", | ||
"deploy": "npm run transpile && npm test && npm publish; rm -rf es5", | ||
"perf": "node src/perf/fs" | ||
@@ -17,0 +17,0 @@ }, |
@@ -30,2 +30,9 @@ const { functions, cmds } = require('./effects') | ||
test( | ||
'testFn should handle undefined returns for semantic test', | ||
testFn(function*() {}, () => { | ||
return args().returns() | ||
}) | ||
) | ||
test( | ||
'testFn should curry', | ||
@@ -32,0 +39,0 @@ testFn(basic)(() => { |
@@ -114,3 +114,3 @@ const assert = require('assert') | ||
const yieldCmd = curry((t, v) => { | ||
const yieldCmd = t => v => { | ||
t[t.length - 1][1] = v | ||
@@ -120,5 +120,5 @@ return { | ||
} | ||
}) | ||
} | ||
const yieldReturns = curry((t, v) => { | ||
const yieldReturns = t => v => { | ||
t[t.length] = [v] | ||
@@ -130,8 +130,8 @@ | ||
} | ||
}) | ||
} | ||
const returns = curry((t, a) => { | ||
const returns = t => a => { | ||
t[t.length - 1][1] = a | ||
return t | ||
}) | ||
} | ||
@@ -138,0 +138,0 @@ // Modified tuples |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
183539
2975