callbag-take

WebJar for callbag-take

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

callbag-take
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

callbag-take
WebJar for callbag-take
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/staltz/callbag-take

Скачать callbag-take

Как подключить последнюю версию

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

callbag-take

Callbag operator that limits the amount of data sent by a source. Works on either pullable and listenable sources.

npm install callbag-take

example

On a listenable source:

const interval = require('callbag-interval');
const observe = require('callbag-observe');
const take = require('callbag-take');

const source = take(3)(interval(1000));

source(0, observe(x => console.log(x))); // 0
                                         // 1
                                         // 2

On a pullable source:

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

function* range(from, to) {
  let i = from;
  while (i <= to) {
    yield i;
    i++;
  }
}

const source = take(4)(fromIter(range(100, 999)));

source(0, iterate(x => console.log(x))); // 100
                                         // 101
                                         // 102
                                         // 103

Версии библиотеки

Версия
1.0.0