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

Robin Duckett picture Robin Duckett · Aug 5, 2011 · Viewed 10.2k times · Source

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 very difficult.

I would like to know if there are any better options, or what is currently being used in production environments.

Thanks for reading.

Answer

evilcelery picture evilcelery · Aug 5, 2011

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.