Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Base class for writable streams
JavaScript
Branch: master

0.4.3

latest commit 978ca93c08
@Raynos authored
Failed to load latest commit information.
examples small tweaks
.gitignore first
LICENCE first
Makefile first
README.md refactor toArray to be a property. update docs
array.js sugar
index.js support 0.8
package.json 0.4.3

README.md

write-stream

Base class for writable streams

Example array

var toArray = require("write-stream").toArray
    , array = []
    , stream = toArray(array, function end() {
        /* never called as process.stdin does not end */
    })

process.stdin.pipe(stream)

setInterval(function () {
    // peek at the buffered array of chunks from stdin every second
    console.log(array)
}, 1000)

Example function

var WriteStream = require("write-stream")
    , stream = WriteStream(function write(chunk) {
        // chunks from stdin
    })

process.stdin.pipe(stream)

Installation

npm install write-stream

Contributors

  • Raynos

MIT Licenced

Something went wrong with that request. Please try again.