node package manager


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 = new Runn();
// Runn callbacks are passed `data` and `done`. 
// `done` is a callback that you fire manually when you function is done executing. 
run.before(function(data, done){ = 'bar';
    asyncOp(function(err, data){
}, function(data, done){
    data = syncOp(data);
run.middle(function(data, done){
    db.update(query, data, function(err, data){
        data = data;
run.after(function(data, done){
    data = translateObj(data);
run.exec({foo:'bar'}, function(err, data){
    console.log(err); // boolean 
    console.log(data); // 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.

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.

$ npm test. The tests use as their test runner.