Test whether an object looks like a promises-a+ promise
JavaScript
Switch branches/tags
Latest commit ff47ce5 Dec 24, 2015 @ForbesLindesay ForbesLindesay Update badges
Permalink
Failed to load latest commit information.
.gitignore Release 1.0.0 Dec 23, 2012
.npmignore Release 1.0.0 Dec 23, 2012
.travis.yml Add LICENSE May 20, 2014
LICENSE Add LICENSE May 20, 2014
component.json Release 2.0.0 Feb 10, 2015
index.js Always return a boolean value Jun 30, 2015
package.json Include only index.js in module Sep 8, 2015
readme.md Update badges Dec 23, 2015
test.js Always return a boolean value Jun 30, 2015

readme.md

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

var isPromise = require('is-promise');

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

License

MIT