1.1.0 • Published 7 years ago

ispromise v1.1.0

Weekly downloads
184
License
MIT
Repository
github
Last release
7 years ago

ispromise

Test whether an object/function is a promises/A+ object/function or constructor. More powerful then is-promise.

NPM version Build Status

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