1.0.2 • Published 8 years ago

ah-batch v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

###Usage

// instantiate a new Batch const batch = new Batch(); batch.add(function(next) { dbcall({}, function(err, result) { // handle err and result // and start next function call in the batch with next() next(result); }); }); // assign a final callback to deal with results when the batch is done batch.done = function(results) { // handle all results. results is an Array }; //start the batch batch.start();

####Arguments passed to the next() function will be passed to the final done() function.