async-context
Provide a middleware-like context to a chain of async functions.
Description
I am a big fan of async.js
but ever so often I need something that allows
me to collect number of dependencies in a row.
This function combines the philosophy of async.js
with a middleware-like
context passing to each continuation function.
I often feel it is easier to write functions in a more generic way then having
to think about how arguments get passed down when using waterfall
, or retrieving
items from the result array using async.each
& co.
Install
npm install async-context
Usage
var context = ; // optionally pass in a context as the first argument -// otherwise it will be provided;