0.1.2 • Published 8 years ago

writable-chronobuffer v0.1.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Writable Buffer

Rationale

The writable chrono buffer is a simple Array buffer as a writable stream.

Define a limit and the buffer will only keep that many records in memory and overwrite the oldest indexes.

Usage

var chronoBuffer = require('writable-chronobuffer')
var rb = chronoBuffer.create({ limit: 3 })

rb.write('foo')
rb.write('bar')
rb.write('baz')
rb.write('qux')

rb.flush() // [ 'bar', 'baz', 'qux' ]