node.js stream that joins multiple pipe inputs into a single unified stream
node.js stream that joins multiple pipe inputs into a single unified stream.
Install via npm:
$ npm install joiner-stream
The reason I wrote this was to merge multiple object streams into a single stream:
var joiner = require'joiner-stream';var aggregator = joiner;// Stream 1makeStreamOfObjectspipeaggregator;// Stream 2makeStreamOfObjectspipeaggregator;// Stream 3makeStreamOfObjectspipeaggregator;aggregatoron'data' console.log;aggregatoron'end' processexit;