1.0.3 • Published 4 years ago

stream-to-variable v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Stream Buffer

Many libraries pass their output to a stream such as (process.stdout or a file stream). Sometimes you don't have any streams to be pass the output to and just want to have the output stream stored in variable. This is the solution.

Usage

It's dead simple

const StreamBuffer = require('stream-to-variable')

const myStream = new StreamBuffer() /* You have a writable stream now */

someFunctionThatWritesToAStream(myStream)
/*
...
*/
console.log(myStream.buffer) /* Dead simple, see? */
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago