ispromise
v1.1.0
Published
Test whether an object is a promises/A+ object or constructor.
Downloads
481
Readme
ispromise
Test whether an object/function is a promises/A+ object/function or constructor. More powerful then is-promise
.
Installation
npm i ispromise -S
Usage
var isPromise = require('ispromise');
isPromise(Promise) // false
isPromise(Promise.resolve()) // true
isPromise.isConstructor(Promise) // true
License
MIT@Jingchen Zhao