cbuffer icon indicating copy to clipboard operation
cbuffer copied to clipboard

JavaScript Circular Buffer

Results 5 cbuffer issues
Sort by recently updated
recently updated
newest added

``` var b = new CBuffer(10); b.push(1, 2, 3, 4, 5); b.rotateLeft(); b.sort(); b.toArray(); ``` => `[1, 1, 2, 3, 4]` Seems the culprit is the use of `shift` in...

bug

Consider implementation of a [quicksort](http://www.nczonline.net/blog/2012/11/27/computer-science-in-javascript-quicksort/). This would be especially useful once `Typed Array Views` and `Buffers` are supported.

enhancement

I was trying to use this for backing a d3.js graph, and after a bit of debugging found that (to me) it looks like the semantics of `.length` and `.size`...

I'm not sure how to do it but it would let it be used on sites like code pen easily. https://github.com/cdnjs/cdnjs

Is there a way to get the total number of items in the buffer? Also, I want to completely dump the buffer by calling `.pop()` in iteration. Can I call...