is-promise
Test whether an object looks like a promises-a+ promise
Last updated 5 years ago by forbeslindesay .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-promise 
SYNC missed versions from official npm registry.

is-promise

Test whether an object looks like a promises-a+ promise

Build Status Dependency Status NPM version

Installation

$ npm install is-promise

You can also use it client side via npm.

API

import isPromise from 'is-promise';

isPromise(Promise.resolve());//=>true
isPromise({then:function () {...}});//=>true
isPromise(null);//=>false
isPromise({});//=>false
isPromise({then: true})//=>false

License

MIT

Current Tags

  • 4.0.0                                ...           latest (5 years ago)

9 Versions

  • 4.0.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.2.2                                ...           5 years ago
  • 2.2.1                                ...           5 years ago
  • 2.2.0                                ...           5 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |