proback.js
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -8,8 +8,8 @@ module.exports = { | ||
}, | ||
forAll: function ( promises, callback ) { | ||
forAll: function ( promises, callback, defaultRes ) { | ||
return new Promise( (resolve, reject) => { | ||
Promise.all( promises ) | ||
.then( (res) => { | ||
if (callback) callback(null, res) | ||
resolve( res ) | ||
if (callback) callback(null, defaultRes || res) | ||
resolve( defaultRes || res ) | ||
} ) | ||
@@ -16,0 +16,0 @@ .catch( (reason) => { |
{ | ||
"name": "proback.js", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Tiny libary to aid Promise/Callback dual API design", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
10638