fold-stream
Allows you to iterate over the chunks of a stream and construct
a new value that will be passed to a callback. It is similar to [].reduce.
In contrast to stream-reduce it does
not return a Through
, but a function that takes a callback and returns a
Writable
stream, where the callback will be called with the result. Kind of
like using stream-reduce
and piping it into
concat-stream.
Install it with npm install fold-stream
.
Here is an example of how we can use it to create a simple concat stream for Strings:
var fold = var concat = processstdin