native-or-bluebird

use either the native Promise or Bluebird

'native-or-bluebird' is deprecated. Please use 'any-promise' instead.
Last updated 10 years ago by jongleberry .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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 (10 years ago)

5 Versions

  • 1.2.0 [deprecated]           ...           10 years ago
  • 1.1.2 [deprecated]           ...           10 years ago
  • 1.1.1 [deprecated]           ...           10 years ago
  • 1.1.0 [deprecated]           ...           10 years ago
  • 1.0.0 [deprecated]           ...           10 years ago
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |