Test whether an object looks like a promises-a+ promise
Switch branches/tags
Clone or download
Permalink
Type Name Latest commit message Commit time
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 Fix broken logo (#8) May 14, 2018
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