herbal
v0.0.3
Published
duplicate data into several streams
Downloads
3
Readme
herbal
duplicate data into several streams
example
npm i -S herbal
const Tee = require('herbal')
// static factories
let tee1 = Tee.create(
fs.createWriteStream('a'),
fs.createWriteStream('b')
)
let tee2 = Tee.createEx(
{ highWaterMark:123 },
fs.createWriteStream('c'),
fs.createWriteStream('d')
)
let tee3 = Tee.createObjectStream(s1, s3, s3)
// constructor
let tee4 = new Tee(
[
fs.createWriteStream('e'),
fs.createWriteStream('f')
],
{ highWaterMark:123 }
)
// add more streams after construction
tee.add(fs.createWriteStream('g'))
tee.add(fs.createWriteStream('h'))
license
MIT © Yaniv Kessler