stream-each

WebJar for stream-each

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

stream-each
Last Version

Last Version

1.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

stream-each
WebJar for stream-each
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mafintosh/stream-each

Download stream-each

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/stream-each/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>stream-each</artifactId>
    <version>1.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/stream-each/
implementation 'org.webjars.npm:stream-each:1.2.3'
// https://jarcasting.com/artifacts/org.webjars.npm/stream-each/
implementation ("org.webjars.npm:stream-each:1.2.3")
'org.webjars.npm:stream-each:jar:1.2.3'
<dependency org="org.webjars.npm" name="stream-each" rev="1.2.3">
  <artifact name="stream-each" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='stream-each', version='1.2.3')
)
libraryDependencies += "org.webjars.npm" % "stream-each" % "1.2.3"
[org.webjars.npm/stream-each "1.2.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : end-of-stream jar [1.1.0,2)
org.webjars.npm : stream-shift jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

stream-each

Iterate all the data in a stream

npm install stream-each

build status

Usage

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 which includes more useful stream modules similar to this one.

Versions

Version
1.2.3
1.2.2
1.1.0