stream-iterate
Iterate through the values in a stream.
npm install stream-iterate
Usage
var iterate =var from =var stream = fromvar read =// recursively iterates through each item in the stream{}
If you don't call next
and call read
again the same (err, value)
pair will be returned.
You can use this module to implement stuff like a streaming merge sort.