Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-is-promise
Test whether an object looks like a promises-a+ promise.
https://github.com/afeiship/next-is-promise
next promise thenable
Last synced: 18 days ago
JSON representation
Test whether an object looks like a promises-a+ promise.
- Host: GitHub
- URL: https://github.com/afeiship/next-is-promise
- Owner: afeiship
- License: mit
- Created: 2019-06-18T16:25:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-21T02:54:02.000Z (almost 4 years ago)
- Last Synced: 2024-10-12T15:31:57.751Z (about 1 month ago)
- Topics: next, promise, thenable
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-is-promise
> Test whether an object looks like a promises-a+ promise.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-is-promise
```## usage
```js
import '@jswork/next-is-promise';const fn1 = () => {
return new Promise(() => {
setTimeout(() => {
resolve('done');
}, 1000);
});
};nx.isPromise(fn1()); // true
```## license
Code released under [the MIT license](https://github.com/afeiship/next-is-promise/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-is-promise
[version-url]: https://npmjs.org/package/@jswork/next-is-promise[license-image]: https://img.shields.io/npm/l/@jswork/next-is-promise
[license-url]: https://github.com/afeiship/next-is-promise/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-is-promise
[size-url]: https://github.com/afeiship/next-is-promise/blob/master/dist/next-is-promise.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-is-promise
[download-url]: https://www.npmjs.com/package/@jswork/next-is-promise