laters
A really simple (but useful?) utility lib for async scatter/gather (both ordered, and keyed) and pipelines.
Ripped from the guts of Anvil.
Pardon the silly examples, imagine that the async calls are doing something super important :)
Parallel - async map with preserved results
laters; // results in [ 2, 3, 4 ]
Execute a hash of asynchronous functions and store results in keys
var hash = { ; } { ; } { ; };laters; // results in { a: 1, b: 2, c: 3 }
Pipeline - asynchronously execute a pipeline
var actions = { ; } { ; } { ; };laters; // results in 20 ( 5 + 5 == 10 / 2 == 5 * 4 == 20 )
License
MIT License - http://opensource.org/licenses/MIT