putil-waterfall
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -8,2 +8,3 @@ /* putil-waterfall | ||
*/ | ||
'use strict'; | ||
@@ -23,3 +24,3 @@ function waterfall(funcs, callback) { | ||
var index = -1; | ||
let index = -1; | ||
const next = function(error) { | ||
@@ -67,12 +68,12 @@ if (error) | ||
const arr = funcArray.slice(0); | ||
var index = -1; | ||
let index = -1; | ||
const next = function(error) { | ||
if (error) | ||
return callback(error); | ||
if (!arr.length) | ||
return callback(); | ||
const v = arr.shift(); | ||
const args = Array.prototype.slice.call(arguments, 1); | ||
index++; | ||
setImmediate(function() { | ||
if (error) | ||
return callback(error); | ||
if (!arr.length) | ||
return callback(); | ||
const v = arr.shift(); | ||
try { | ||
@@ -79,0 +80,0 @@ const o = fn.apply(fn, [next, v, index].concat(args)); |
{ | ||
"name": "putil-waterfall", | ||
"description": "Simple, fast async waterfall NodeJs module for JavaScript", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"author": "Panates Ltd.", | ||
@@ -20,3 +20,5 @@ "contributors": [ | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"4": "0.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -23,0 +25,0 @@ "babel-eslint": "^8.0.2", |
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
8374
80
1