nqueue

npm install nqueue
2 downloads in the last week
4 downloads in the last month

nQueue

Simple async function queuing module. Will call 'complete' function if empty queue.

Usage

npm install nqueue

var nQueue = require('nqueue');

nQueue.push(function(queueItemCallback) {
    // do some stuff and call queueItemCallback() when completey
});
nQueue.push(function(queueItemCallback) {
    // do some stuff and call queueItemCallback() when completey
});
nQueue.push(function(queueItemCallback) {
    // do some stuff and call queueItemCallback() when completey
});

nQueue.execute(
    // this is called everytime a queue item completes
    function() {
        // do some stuff
    },

    // this is call when all the items in the queue have executed
    function() {

    }
);
npm loves you