@f/is-promise

Check whether a value is a promise.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Dec 16, 2015Nov 30, 2015Minified + gzip package size for @f/is-promise in KB

Readme

is-promise

Build status Git tag NPM version Code style

Check whether a value is a promise.

Installation

$ npm install @f/is-promise

Usage

var isPromise = require('@f/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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.