native-queue-example

1.0.0 • Public • Published

Native Queue Example

A C++ queue abstraction for nodejs

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

Readme

Keywords

none

Package Sidebar

Install

npm i native-queue-example

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • charleskenney