Simple JavaScript queue
$ component install ForbesLindesay/queue
Call queue()
to create a new queue object:
var queue = require('queue');
var myQueue = queue();
You can also use queue(mixin)
as a mixin:
var queue = require('queue');
queue(myObject);
Adds a new item to the queue, and returns the queue for chaining.
Returns the next item in the queue, and remove it.
Returns the next item in the queue, without removing it.
Returns true
if there are no items left in the queue.
MIT