duplicate data into several streams
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'))
MIT © Yaniv Kessler