npm install run-series
Run the functions in the
tasks array in series, each one running once the previous
function has completed. If any functions in the series pass an error to its callback, no
more functions are run, and
callback is immediately called with the value of the error.
callback receives an array of results when
tasks have completed.
tasks- An array containing functions to run, each function is passed a
callback(err, result)which it must call on completion with an error
err(which can be
null) and an optional result value.
callback(err, results)- An optional callback to run once all the functions have completed. This function gets a results array containing all the result arguments passed to the task callbacks.
var series =
This module is basically equavalent to
async.series, but it's
handy to just have the functions you need instead of the kitchen sink. Modularity!
Works great in the browser with browserify!
MIT. Copyright (c) Feross Aboukhadijeh.