1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
Oinktube/node_modules/write-stream
2022-07-15 11:08:01 -03:00
..
examples New updates and modules 2022-07-15 11:08:01 -03:00
node_modules/readable-stream New updates and modules 2022-07-15 11:08:01 -03:00
.npmignore New updates and modules 2022-07-15 11:08:01 -03:00
array.js New updates and modules 2022-07-15 11:08:01 -03:00
index.js New updates and modules 2022-07-15 11:08:01 -03:00
LICENCE New updates and modules 2022-07-15 11:08:01 -03:00
Makefile New updates and modules 2022-07-15 11:08:01 -03:00
package.json New updates and modules 2022-07-15 11:08:01 -03:00
README.md New updates and modules 2022-07-15 11:08:01 -03:00

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