ring-buffjs
v1.0.0
Published
Circular queue
Downloads
4
Readme
ring-buffjs
Fixed-capacity circular queue
Installation
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm install ring-buffjs
API
var RingBuffer = require('ring-buffjs')
var buffer = new RingBuffer(4); // create queue with size 4
buffer.offer(1);
buffer.peek(); // => 1
buffer.poll(); // => 1