1.0.0 • Published 9 years ago

@micro-js/is-promise v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 years ago

is-promise

Build status Git tag NPM version Code style

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