A duplex stream that buffers writes
JavaScript
Switch branches/tags
Nothing to show
Latest commit e2ba3a2 Aug 23, 2012 @Raynos typo
Permalink
Failed to load latest commit information.
example first Aug 24, 2012
.gitignore wow. Be gone node_modules Aug 24, 2012
LICENCE first Aug 24, 2012
Makefile first Aug 24, 2012
README.md typo Aug 24, 2012
index.js first Aug 24, 2012
package.json first Aug 24, 2012

README.md

buffer-stream

A duplex stream that buffers writes

Example

var BufferStream = require("buffer-stream")

var buffer = BufferStream().buffer()

buffer.write("stuff")

buffer.on("data", doStuff)

someTimeLater(function (stream) {
    // Oh we have a stream
    // Empty the buffer onto the stream
    // Further writes to the buffer go directly to the stream
    // Any data the stream emits get's re-emitted on the buffer
    buffer.empty(stream)
})

Installation

npm install buffer-stream

Contributors

  • Raynos

MIT Licenced