native-queue-example
v1.0.0
Published
<h2 align="center">Native Queue Example</h2> <p align="center">A C++ queue abstraction for nodejs</p>
Readme
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