While I'm not overjoyed about how performant the internals will operate, I wanted a readable stream that was ACTUALLY A READABLE STREAM. Not a streams1 stream masquerading as streams2. As soon as somebody writes a better concat stream as a readable stream with a nice simple API, this baby is going to develop some serious abandonment issues.
npm install sandwich-stream --save
;// OR EVEN:// const SandwichStream = require('sandwich-stream');;sandwich.addaStreamIPreparedEarlier.addanotherStreamIPreparedEarlier.addaFurtherStreamIPreparedEarlier.pipeprocess.stdout;// The thing at the top// ----// Stream1// ----// Stream2// ----// Stream3// The thing at the bottom
headoption takes a string/buffer and pushes the string before all other content
footoption takes a string/buffer and pushes the string after all other data has been pushed
separatoroption pushes a string/buffer between each stream
- Readable Options can also be passed through.
Too add a stream use the .add method:
Wanna known more about Node Streams? Read this.