What is the best control flow module for node.js?

后端 未结 3 1598
醉梦人生
醉梦人生 2021-02-18 22:43

I\'ve used caolan\'s async module which is very good, however tracking errors and the varying way of passing data through for control flow causes development to sometimes be ver

3条回答
  •  情深已故
    2021-02-18 23:14

    I use async as well. To help tracking errors it's recommended you name your functions, instead of having loads of anonymous functions:

    async.series([
      function doSomething() {...},
      function doSomethingElse() {...},
      function finish() {...}
    ]);
    

    This way you'll get more helpful information in stack traces.

提交回复
热议问题