The nodejs async module: https://github.com/caolan/async provides 2 similar methods, async.waterfall and async.series.
What is the difference between them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It appears that
async.waterfallallows each function to pass its results on to the next function, whileasync.seriespasses all results to the final callback. At a higher level,async.waterfallwould be for a data pipeline (“given 2, multiply it by 3, add 2, and divide by 17”), whileasync.serieswould be for discrete tasks that must be performed in order, but are otherwise separate.