1.0.0 • Published 7 years ago
native-queue-example v1.0.0
API Usage
Queue.prototype.enqueue(n)
Pushes an integer n
to the back of the queue.
Queue.prototype.dequeue();
Pops head from the queue and returns its value.
Queue.prototype.peek();
Returns head's value without popping it from the queue.
Example
const Queue = require('native-queue-nan');
const q = new Queue();
q.enqueue(5);
q.dequeue();
// => 5
1.0.0
7 years ago