Current Path: > > lib > node_modules > npm > node_modules > stream-each
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
.npmignore | File | 13 bytes | March 10 2021 14:36:38. | |
.travis.yml | File | 62 bytes | March 10 2021 14:36:38. | |
LICENSE | File | 1079 bytes | March 10 2021 14:36:38. | |
README.md | File | 1012 bytes | March 10 2021 14:36:38. | |
collaborators.md | File | 352 bytes | March 10 2021 14:36:38. | |
index.js | File | 1019 bytes | March 10 2021 14:36:38. | |
package.json | File | 1642 bytes | March 10 2021 14:36:38. | |
test.js | File | 2079 bytes | March 10 2021 14:36:38. |
# stream-each Iterate all the data in a stream ``` npm install stream-each ``` [](http://travis-ci.org/mafintosh/stream-each) ## Usage ``` js var each = require('stream-each') each(stream, function (data, next) { console.log('data from stream', data) // when ready to consume next chunk next() }, function (err) { console.log('no more data') }) ``` ## API #### `each(stream, iterator, cb)` Iterate the data in the stream by calling the iterator function with `(data, next)` where data is a data chunk and next is a callback. Call next when you are ready to consume the next chunk. Optionally you can call next with an error to destroy the stream When the stream ends/errors the callback is called if provided ## License MIT ## Related `stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
SILENT KILLER Tool