runner5
v0.0.6
Published
Callback wrapper
Downloads
1
Readme
Runner5
Running all of your functions.
Error Example:
var Runner5 = require('runner5');
function test(arg1, cb) {
// do something
cb('BLAH!', null);
}
var context = {};
var runner = new Runner5(context, test)
runner.error(function(err) {
console.log(err);
});
runner.run(4);
or
var Runner5 = require('runner5');
function test(arg1, cb) {
// do something
cb('BLAH!', null);
}
var context = {};
var runner = new Runner5(context, test)
runner.on('failure', function(err) {
console.log(err);
});
runner.run(4);
Success Example:
var Runner5 = require('runner5');
function test(arg1, cb) {
// do something
cb(null, ['a', 'b']);
}
var context = {};
var runner = new Runner5(context, test)
runner.success(function(results) {
console.log(results);
});
runner.run(4);
or
var Runner5 = require('runner5');
function test(arg1, cb) {
// do something
cb(null, ['a', 'b']);
}
var context = {};
var runner = new Runner5(context, test)
runner.on('success', function(results) {
console.log(results);
});
runner.run(4);