Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

native-or-bluebird

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-or-bluebird

use either the native Promise or Bluebird

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
decreased by-23.05%
Maintainers
2
Weekly downloads
 
Created
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

Package last updated on 12 Feb 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc