Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
65
rated 0 times [  68] [ 3]  / answers: 1 / hits: 34094  / 13 Years ago, mon, february 13, 2012, 12:00:00

The nodejs async module: https://github.com/caolan/async provides 2 similar methods, async.waterfall and async.series.



What is the difference between them?


More From » node.js

 Answers
17

It appears that async.waterfall allows each function to pass its results on to the next function, while async.series passes all results to the final callback. At a higher level, async.waterfall would be for a data pipeline (given 2, multiply it by 3, add 2, and divide by 17), while async.series would be for discrete tasks that must be performed in order, but are otherwise separate.


[#87504] Saturday, February 11, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bryantc

Total Points: 455
Total Questions: 96
Total Answers: 110

Location: San Marino
Member since Thu, Jun 30, 2022
2 Years ago
bryantc questions
Fri, Aug 13, 21, 00:00, 3 Years ago
Tue, Mar 30, 21, 00:00, 3 Years ago
Fri, Jun 5, 20, 00:00, 4 Years ago
Wed, May 27, 20, 00:00, 4 Years ago
;