|
|
||||
|---|---|---|---|---|
| .. | ||||
| .npmignore | 11e3a9652a | 7 年之前 | ||
| .travis.yml | 11e3a9652a | 7 年之前 | ||
| LICENSE | 11e3a9652a | 7 年之前 | ||
| index.js | 11e3a9652a | 7 年之前 | ||
| package.json | 11e3a9652a | 7 年之前 | ||
| readme.md | 11e3a9652a | 7 年之前 | ||
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