A simple, efficient queue module for node and the browser.
Create a new empty queue:
var q = new Queue();
Push something onto the queue:
q.push(2);
Properties top
and length
:
console.log(q.top, q.length);
Pop the head of the queue (returns the head):
console.log(q.pop());
Reset the queue back to be empty:
q.reset();
Queue was written with care and love by Chris.
Queue is released under the MIT License. See LICENSE.