p-is-promise

WebJar for p-is-promise

Лицензия

Лицензия

MIT
Группа

Группа

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

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

p-is-promise
Последняя версия

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

2.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

p-is-promise
WebJar for p-is-promise
Ссылка на сайт

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

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

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

https://github.com/sindresorhus/p-is-promise

Скачать p-is-promise

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

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

Зависимости

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

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

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

p-is-promise

Check if something is a promise

Why not is-promise? That module checks for a thenable, not an ES2015 promise. This one is stricter.

You most likely don't need this. Just pass your value to Promise.resolve() and let it handle it.

Can be useful if you need to create a fast path for a synchronous operation.

Install

$ npm install p-is-promise

Usage

const pIsPromise = require('p-is-promise');
const Bluebird = require('bluebird');

pIsPromise(Promise.resolve('🦄'));
//=> true

pIsPromise(Bluebird.resolve('🦄'));
//=> true

pIsPromise('🦄');
//=> false

Related


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

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

Версия
2.1.0
2.0.0
1.1.0