native-or-bluebird

use either the native Promise or Bluebird

'native-or-bluebird' is deprecated. Please use 'any-promise' instead.
Last updated 6 years ago by jongleberry .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install native-or-bluebird 
SYNC missed versions from official npm registry.

native-or-bluebird

NPM version Build status Test coverage Dependency Status License Downloads Gittip

Use either bluebird or the native Promise implementation. If no implementation is found, an error will be thrown:

var Promise = require('native-or-bluebird');

The goal of this library is to be able to eventually remove this line from your code and use native Promises, allowing you to to write future-compatible code with ease. You should install bluebird in your libraries for maximum compatibility.

If you do not want an error to be thrown, require() the Promise implementation directly. If no implementation is found, undefined will be returned.

var Promise = require('native-or-bluebird/promise');
if (Promise) // do stuff with promises

Current Tags

  • 1.2.0                                ...           latest (6 years ago)

5 Versions

  • 1.2.0 [deprecated]           ...           6 years ago
  • 1.1.2 [deprecated]           ...           6 years ago
  • 1.1.1 [deprecated]           ...           6 years ago
  • 1.1.0 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
Downloads
Today 72
This Week 183
This Month 980
Last Day 111
Last Week 479
Last Month 2,044
Dependencies (0)
None
Dev Dependencies (3)
Dependents (133)

Copyright 2014 - 2016 © taobao.org |