is-promise
Test whether an object looks like a promises-a+ promise
Last updated 4 years ago by forbeslindesay .
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

var isPromise = require('is-promise');

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

License

MIT

Current Tags

  • 2.1.0                                ...           latest (4 years ago)

4 Versions

  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           7 years ago
Downloads
Today 17,722
This Week 17,722
This Month 297,532
Last Day 5,150
Last Week 98,375
Last Month 429,101
Dependencies (0)
None
Dev Dependencies (2)
Dependents (487)

Copyright 2014 - 2016 © taobao.org |