pinkie

WebJar for pinkie

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

2.0.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

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

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

https://github.com/floatdrop/pinkie

Скачать pinkie

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

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

Зависимости

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

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

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


pinkie

Itty bitty little widdle twinkie pinkie ES2015 Promise implementation

Build Status Coverage Status

There are tons of Promise implementations out there, but all of them focus on browser compatibility and are often bloated with functionality.

This module is an exact Promise specification polyfill (like native-promise-only), but in Node.js land (it should be browserify-able though).

Install

$ npm install --save pinkie

Usage

var fs = require('fs');
var Promise = require('pinkie');

new Promise(function (resolve, reject) {
	fs.readFile('foo.json', 'utf8', function (err, data) {
		if (err) {
			reject(err);
			return;
		}

		resolve(data);
	});
});
//=> Promise

API

pinkie exports bare ES2015 Promise implementation and polyfills Node.js rejection events. In case you forgot:

new Promise(executor)

Returns new instance of Promise.

executor

Required
Type: function

Function with two arguments resolve and reject. The first argument fulfills the promise, the second argument rejects it.

pinkie.all(promises)

Returns a promise that resolves when all of the promises in the promises Array argument have resolved.

pinkie.race(promises)

Returns a promise that resolves or rejects as soon as one of the promises in the promises Array resolves or rejects, with the value or reason from that promise.

pinkie.reject(reason)

Returns a Promise object that is rejected with the given reason.

pinkie.resolve(value)

Returns a Promise object that is resolved with the given value. If the value is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the value.

Related

License

MIT © Vsevolod Strukchinsky

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

Версия
2.0.4