var Async = ; // next()-chained async tasks ;
Usage
new Async(context)
will expose three methods:
- catch(handler) — Error handler for the chain
- then(handler) — Adds a subtask to chain
- run(success) — Initialize the chain
The created chain will be consumed until there are no more subtasks to invoke.
The constructor function can accept a context that will be bound on each callback.
Async.queue()
is deprecated since 0.2.0
.