A writable stream that can be piped to multiple other writable streams.
npm i multi-pipe-stream -S
// @stream - A stream to pipe to
myMultiStream.pipeTo(stream);
// @stream - A stream that is already being piped to
myMultiStream.unpipeFrom(stream);
var MultiStream = require('multi-pipe-stream');
// Create a new MultiStream
var stream = new MultiStream();
// Pipe the original stream to the MultiStream
originalStream.pipe(stream);
// Add multiple pipes out from this stream to multiple destinations
stream.pipeTo(destStream1);
stream.pipeTo(destStream2);
// Remove a destination stream from being piped to
stream.unpipeFrom(destStream1);