1.0.0 • Published 5 years ago
ring-buffjs v1.0.0
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
License
1.0.0
5 years ago