pend

WebJar for pend

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

1.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

pend
WebJar for pend
Ссылка на сайт

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

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

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

https://github.com/andrewrk/node-pend

Скачать pend

Имя Файла Размер
pend-1.2.0.pom
pend-1.2.0.jar 5 KB
pend-1.2.0-sources.jar 22 bytes
pend-1.2.0-javadoc.jar 22 bytes
Обзор

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

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

Зависимости

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

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

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

Pend

Dead-simple optimistic async helper.

Usage

var Pend = require('pend');
var pend = new Pend();
pend.max = 10; // defaults to Infinity
setTimeout(pend.hold(), 1000); // pend.wait will have to wait for this hold to finish
pend.go(function(cb) {
  console.log("this function is immediately executed");
  setTimeout(function() {
    console.log("calling cb 1");
    cb();
  }, 500);
});
pend.go(function(cb) {
  console.log("this function is also immediately executed");
  setTimeout(function() {
    console.log("calling cb 2");
    cb();
  }, 1000);
});
pend.wait(function(err) {
  console.log("this is excuted when the first 2 have returned.");
  console.log("err is a possible error in the standard callback style.");
});

Output:

this function is immediately executed
this function is also immediately executed
calling cb 1
calling cb 2
this is excuted when the first 2 have returned.
err is a possible error in the standard callback style.

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

Версия
1.2.0