@micro-js/is-promise

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @micro-js/is-promise

Weekly Downloads

4

Version

1.0.0

License

MIT

Last publish

Collaborators

  • micro-js