D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
cpanel
/
ea-nodejs10
/
lib
/
node_modules
/
npm
/
node_modules
/
stream-each
/
Filename :
README.md
back
Copy
# 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.
Name
Size
Last Modified
Owner
Permissions
Actions
.npmignore
0.013
KB
September 13 2023 2:48:05
root
0644
.travis.yml
0.061
KB
September 13 2023 2:48:05
root
0644
LICENSE
1.054
KB
September 13 2023 2:48:05
root
0644
README.md
0.988
KB
September 13 2023 2:48:05
root
0644
collaborators.md
0.344
KB
September 13 2023 2:48:05
root
0644
index.js
0.995
KB
September 13 2023 2:48:05
root
0644
package.json
1.604
KB
September 13 2023 2:48:05
root
0644
test.js
2.03
KB
September 13 2023 2:48:05
root
0644
2017 © D7net | D704T team