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