circularbuffer
A small circular/ring buffer implementation in TypeScript.
Install
# using npm npm install --save circularbuffer # using yarn yarn add circularbuffer
Usage
; ;queue.enq'foo';queue.enq'bar', 'baz';queue.toArray; // ['foo', 'bar', 'baz']queue.size; // 3queue.capacity; // 5queue.replace1, 2, 3, 4, 5, 6, 7;queue.toArray; // [3, 4, 5, 6, 7]
Development
# build yarn run build # test yarn run test
License
MIT © Vince Coppola