Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

putil-waterfall

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

putil-waterfall - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

29

lib/waterfall.js

@@ -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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc