Versitale and easy to use funciton running
Middleware style function invocation, run a series of asynchronus functions in order.
var Runn = require'runn';var run = ;// Runn callbacks are passed `data` and `done`.// `done` is a callback that you fire manually when you function is done executing.runbeforedatafoo = 'bar';asyncOpdoneerr;;data = syncOpdata;done;;runmiddledbupdatequery datadata = data;doneerr;;;runafterdata = translateObjdata;done;;runexecfoo:'bar'console.logerr; // booleanconsole.logdata; // your data;
Constructor, returns a fresh instance.
Accepts any number of named or anonymous functions as arguments. Runn will run these functions in series.
Accepts an Object and a callback.
.exec is called, the functions passed into
.after will be executed in order, passing the first argument of the
.exec method in each time.
$ npm test. The tests use http://github.com/visionmedia/mocha as their test runner.