Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
lib
/
node_modules
/
npm
/
node_modules
/
stream-iterate
/
File Content:
README.md
# stream-iterate Iterate through the values in a stream. ``` npm install stream-iterate ``` [](http://travis-ci.org/mafintosh/stream-iterate) ## Usage ``` js var iterate = require('stream-iterate') var from = require('from2') var stream = from.obj(['a', 'b', 'c']) var read = iterate(stream) loop() // recursively iterates through each item in the stream function loop () { read(function (err, data, next) { console.log(err, data) next() loop() }) } ``` 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](https://github.com/mafintosh/stream-iterate/blob/master/test.js#L5-L47). ## License [MIT](LICENSE)
Submit
FILE
FOLDER
Name
Size
Permission
Action
node_modules
---
0755
.npmignore
13 bytes
0644
.travis.yml
60 bytes
0644
LICENSE
1079 bytes
0644
README.md
834 bytes
0644
index.js
1361 bytes
0644
package.json
1521 bytes
0644
test.js
1231 bytes
0644
N4ST4R_ID | Naxtarrr