vlad 6f123ff03e 18.07 | 6 lat temu | |
---|---|---|
.. | ||
.npmignore | 6 lat temu | |
.travis.yml | 6 lat temu | |
LICENSE | 6 lat temu | |
index.js | 6 lat temu | |
package.json | 6 lat temu | |
readme.md | 6 lat temu |
Test whether an object looks like a promises-a+ promise
$ npm install is-promise
You can also use it client side via npm.
var isPromise = require('is-promise');
isPromise({then:function () {...}});//=>true
isPromise(null);//=>false
isPromise({});//=>false
isPromise({then: true})//=>false
MIT