is-promise
Test whether an object looks like a promises-a+ promise
Last updated a month ago by then-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a month ago)

9 Versions

  • 4.0.0                                ...           a month ago
  • 3.0.0                                ...           a month ago
  • 2.2.2                                ...           a month ago
  • 2.2.1                                ...           a month ago
  • 2.2.0                                ...           a month ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           7 years ago
Downloads
Today 961
This Week 961
This Month 381,517
Last Day 7,239
Last Week 118,463
Last Month 659,710
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (581)

Copyright 2014 - 2016 © taobao.org |