
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
promise-waterfall
Advanced tools
promise-waterfall extends promise utilities with sequential flow control like async.waterfall
Promise-waterfall extends promise utilities with sequential flow control like async.waterfall.
Since Promise.all(promiseArr)
|| Promise.spread(promiseArr)
execs promises simultaneously, each of the functions in the promiseArr cannot depend on another, and if you want promises execute in order or some of the promises need the resolved value of another, this library is for you.
npm install promise-waterfall
var waterfall = require("promise-waterfall");
var func1 = function(){
// return a promise
},
func2 = function(res1){
// optionally use res1
// which is resolved from func1
// and return a promise
},
func3 = function(res2){
// like func2
},
promiseSequence = [func1, func2, func3];
waterfall(promiseSequence)
// the promiseSequence will executes sequentially
// just like func1().then(func2).then(func3)
.then(function(res){
// use res
})
.catch(function(err){
// deal with error
});
See test cases in /tests
for full examples.
run npm test
or make test
FAQs
promise-waterfall extends promise utilities with sequential flow control like async.waterfall
The npm package promise-waterfall receives a total of 1,718 weekly downloads. As such, promise-waterfall popularity was classified as popular.
We found that promise-waterfall demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.