introduce Readable and Duplex concat streams
zenflow opened this issue · 1 comments
zenflow commented
I wish to be able to do something like this:
concat(input_string) // or `concat([input_string])`
.pipe(someTransform())
.pipe(concat(function(data){
// ...
});
This is basically using concat-stream to do the reverse (getting a stream from a single piece of data) of what it already does (getting a single piece of data from a stream).
Going even further... why not have duplex concat-streams?
var input = getReadableStream().pipe(concat());
input.once('data', function(data) {
// do something with [complete] input data
});
var transformed = input.pipe(getTransformStream()).pipe(concat());
transformed.once('data', function(data) {
// do something with [complete] transformed data
});
transformed.pipe(getWritableStream());