sensordb2 e64a8defe5 3.17 | 1 gadu atpakaļ | |
---|---|---|
.. | ||
LICENSE | 1 gadu atpakaļ | |
index.js | 1 gadu atpakaļ | |
index.mjs | 1 gadu atpakaļ | |
package.json | 1 gadu atpakaļ | |
readme.md | 1 gadu atpakaļ |
Test whether an object looks like a promises-a+ promise
$ npm install is-promise
You can also use it client side via npm.
import isPromise from 'is-promise';
isPromise(Promise.resolve());//=>true
isPromise({then:function () {...}});//=>true
isPromise(null);//=>false
isPromise({});//=>false
isPromise({then: true})//=>false
MIT