promise-accum
Advanced tools
Comparing version 1.4.0 to 1.5.0
13
index.js
@@ -21,2 +21,3 @@ function createAccum(params) { | ||
accumulator.merge = merge; | ||
accumulator.without = _without(params); | ||
@@ -48,2 +49,13 @@ return accumulator; | ||
function _without(params) { | ||
function without(param) { | ||
var newParams = {}; | ||
for (var k in params) { | ||
if (k != param && params.hasOwnProperty(k)) { newParams[k] = params[k]; } | ||
} | ||
return createAccum(newParams); | ||
} | ||
} | ||
module.exports = function promiseAccum(name) { | ||
@@ -56,1 +68,2 @@ // Initialize accumulator with no params. | ||
module.exports.merge = merge; | ||
module.exports.without = function() { return createAccum({}); }; |
{ | ||
"name": "promise-accum", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Solve variable scoping and/or callback hell in promises", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4502
53