smallbitmatters / mintee

a tiny module for piping an input to multiple output streams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mintee

This is a tiny module for piping an input to multiple output streams safely. It emits 'finish' when all of the writable streams it's writing into all emit 'finish'.

USAGE

const Tee = require('mintee')
const tee = new Tee(output1, output2, output3)
tee.on('finish', () => {
  console.log('wrote to all three via tee')
})
input.pipe(tee)

About

a tiny module for piping an input to multiple output streams

License:ISC License


Languages

Language:JavaScript 77.6%Language:Shell 22.4%