tasq/node_modules/is-promise
2026-04-09 19:01:53 +08:00
..
index.d.ts added ruflo 2026-04-09 19:01:53 +08:00
index.js added ruflo 2026-04-09 19:01:53 +08:00
index.mjs added ruflo 2026-04-09 19:01:53 +08:00
LICENSE added ruflo 2026-04-09 19:01:53 +08:00
package.json added ruflo 2026-04-09 19:01:53 +08:00
readme.md added ruflo 2026-04-09 19:01:53 +08:00

is-promise

Test whether an object looks like a promises-a+ promise

Build Status Dependency Status NPM version

Installation

$ npm install is-promise

You can also use it client side via npm.

API

import isPromise from 'is-promise';

isPromise(Promise.resolve());//=>true
isPromise({then:function () {...}});//=>true
isPromise(null);//=>false
isPromise({});//=>false
isPromise({then: true})//=>false

License

MIT