Skip to content

Test whether an object looks like a promises-a+ promise

License

Notifications You must be signed in to change notification settings

then/is-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-promise

Test whether an object looks like a promises-a+ promise

Installation

Client:

$ component install then/is-promise

Server:

$ npm install is-promise

API

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

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

License

MIT