Runn
Middleware style function invocation, run a series of asynchronus functions in order.
Example
var Runn = ; var run = ; // Runn callbacks are passed `data` and `done`.// `done` is a callback that you fire manually when you function is done executing.run; run; run; run;
API
Runn
Constructor, returns a fresh instance.
.before
, .middle
, .after
Accepts any number of named or anonymous functions as arguments. Runn will run these functions in series.
.exec
Accepts an Object and a callback.
When .exec
is called, the functions passed into .before
, .middle
and .after
will be executed in order, passing the first argument of the .exec
method in each time.
Running Tests
$ npm test
. The tests use http://github.com/visionmedia/mocha as their test runner.