1.0.0 • Published 9 years ago
@micro-js/is-promise v1.0.0
is-promise
Check whether a value is a promise.
Installation
$ npm install @micro-js/is-promise
Usage
var isPromise = require('@micro-js/is-promise');
isPromise({then: function () {...}}) // => true
isPromise(null) // => false
isPromise({}) // => false
isPromise({then: true})// => false
API
isPromise(value)
value
- value to test
Returns: boolean
License
MIT