Socket
Socket
Sign inDemoInstall

native-or-bluebird

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    native-or-bluebird

use either the native Promise or Bluebird


Version published
Weekly downloads
20K
decreased by-22.54%
Maintainers
2
Install size
5.44 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 12 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc