stream-iterate

WebJar for stream-iterate

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

stream-iterate
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

stream-iterate
WebJar for stream-iterate
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

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

Download stream-iterate

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : readable-stream jar [2.1.5,3)
org.webjars.npm : stream-shift jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

stream-iterate

Iterate through the values in a stream.

npm install stream-iterate

build status

Usage

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.

License

MIT

Versions

Version
1.2.0