0.0.2 • Published 13 years ago

through-stream v0.0.2

Weekly downloads
2
License
-
Repository
github
Last release
13 years ago

through-stream

Base stream class for through RW stream

Example

// The buffer is shared among the stream and is an array
var through = require("through-stream")
    , stream = through(function write(chunk, buffer) {
        buffer.push(chunk)
        // Handle writing the chunk
    }, function read(bytes, buffer) {
        // Handle reading the bytes
        return buffer.shift()
    }, function end() {
        // Stream has ended
    })

// Do stuff with stream

Installation

npm install through-stream

Contributors

  • Raynos

MIT Licenced