putil-waterfall
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -31,16 +31,19 @@ /* putil-waterfall | ||
if (fn) { | ||
setImmediate(function() { | ||
try { | ||
const o = fn.apply(fn, [next].concat(args)); | ||
// If promise | ||
if (o && typeof o === 'object' && | ||
typeof o.then === 'function' && typeof o.catch === 'function') { | ||
o.catch(function(e) { | ||
callback.apply(callback, [e].concat(args)); | ||
}); | ||
} | ||
} catch (e) { | ||
callback.apply(callback, [e].concat(args)); | ||
try { | ||
const o = fn.apply(fn, [function() { | ||
const args = arguments; | ||
setImmediate(function() { | ||
next.apply(null, args); | ||
}); | ||
}].concat(args)); | ||
// If promise | ||
if (o && typeof o === 'object' && | ||
typeof o.then === 'function' && typeof o.catch === 'function') { | ||
o.catch(function(e) { | ||
callback.apply(callback, [e].concat(args)); | ||
}); | ||
} | ||
}); | ||
} catch (e) { | ||
callback.apply(callback, [e].concat(args)); | ||
} | ||
} else | ||
@@ -47,0 +50,0 @@ callback.apply(callback, [undefined].concat(args)); |
{ | ||
"name": "putil-waterfall", | ||
"description": "Simple, fast async waterfall NodeJs module for ES6.", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "Panates Ltd.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8279
78
0