callbag-from-iter

WebJar for callbag-from-iter

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

callbag-from-iter
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

callbag-from-iter
WebJar for callbag-from-iter
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/staltz/callbag-from-iter

Download callbag-from-iter

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

callbag-from-iter

Convert a JS Iterable or Iterator to a callbag pullable source (it only sends data when requested).

npm install callbag-from-iter

example

Convert an Iterable:

const fromIter = require('callbag-from-iter');
const iterate = require('callbag-iterate');

const source = fromIter([10, 20, 30, 40]);

iterate(x => console.log(x))(source);   // 10
                                        // 20
                                        // 30
                                        // 40

Convert an Iterator:

const fromIter = require('callbag-from-iter');
const iterate = require('callbag-iterate');

const source = fromIter([10, 20, 30, 40].entries());

iterate(x => console.log(x))(source); // [0,10]
                                      // [1,20]
                                      // [2,30]
                                      // [3,40]

Versions

Version
1.0.0