runq

    1.1.2 • Public • Published

    runq

    Run a queue of functions sequentially.

    Install

    npm install runq
    

    Usage

    runq = require("runq");
    
    runq()
    .add(function(cb, a) {
    	cb(null, a + 1);
    })
    .add(function(cb, a) {
    	cb(null, a + 1);
    })
    .run(function(err, r) {
    	// all done
    	if(err) {
    		// ...
    	}
    	else {
    		console.log(a);		// 3
    	}
    }, 1)
    

    Keywords

    none

    Install

    npm i runq

    DownloadsWeekly Downloads

    1,427

    Version

    1.1.2

    License

    MIT

    Last publish

    Collaborators

    • sleeplessinc