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

native-or-another

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-or-another - npm Package Versions

5.0.1

Diff

Changelog

Source

5.0.1 (2017-03-17)

Bug Fixes

  • libs: fix for q-like promise libs (a6152b8)

<a name="5.0.0"></a>

tunnckocore
published 5.0.0 •

Changelog

Source

5.0.0 (2017-03-17)

Bug Fixes

Code Refactoring

  • rewrite: update boilerplate and rethink it (00e29b8)

BREAKING CHANGES

  • rewrite: main export now expose a Promise constructor; use native-or-another/register if you want to load custom promise for node < 0.12; register expects an "opts" object with "Promise" and "global" properties; if opts.global is false, it won't attach/add promise to global.Promise - this is enabled by default
tunnckocore
published 4.0.0 •

Changelog

Source

v4.0.0 - 2016-08-25

  • Release v4.0.0 / npm@v4.0.0
  • update travis builds, update docs
  • replace assertit it with mukla
  • breaking: remove bluebird from dependencies

Throws if not native Promise support and not Promize were given and not bluebird were found. So if you wanna have Promise in node@0.10 or such, you should install bluebird as devDependency or to pass some Promise implementation to that package.

It is removed, because bluebird is huge as kb and it will be there always, no matter if your environment have support for native Promise.

tunnckocore
published 3.0.2 •

Changelog

Source

v3.0.2 - 2016-01-13

  • Release v3.0.2 / npm@v3.0.2
  • greenkeeper update all deps
tunnckocore
published 3.0.1 •

Changelog

Source

v3.0.1 - 2015-09-29

  • Release v3.0.1 / npm@v3.0.1
  • fix/update tests - ensure properties exists and works on 0.10
  • fix changelog (notice added properties are prefixed with three underscores)
tunnckocore
published 3.0.0 •

Changelog

Source

v3.0.0 - 2015-09-29

  • Release v3.0.0 / npm@v3.0.0
  • change prurpose of the library
  • refactor and update boilerplate

Basically, because native-or-bluebird always try to use bluebird first and then fallbacks to native Promise if available. So you don't have ability to get Promise or to provide different promise module than bluebird. So you can't get any promise in 0.10 enviroment for example.

So native-or-another is here to help and always will give you Promise, no matter what enviroment you use - iojs, 0.10, 0.11 or 0.12 or latest nodejs v4. It always will try to give you native Promsie first, otherwise will give you bluebird promise, but remember, only if you don't give another promise module like q or promise or what you want. See the example on README.md file.

You also can check what promise you use. If you use custom promise Promise module, the constructor will have property called ___customPromise (yes, three underscores) with true value. If you use Bluebird you will have property on the constructor ___bluebirdPromise (yes, three underscores) and again with true value. Otherwise they won't exist.

tunnckocore
published 2.0.0 •

Changelog

Source

v2.0.0 - 2014-12-21

  • Release v2.0.0 / npm@v2.0.0
  • change the purpose of library
  • now exports deferred object
tunnckocore
published 1.0.0 •

Changelog

Source

v1.0.0 - 2015-10-28

  • Release v1.0.0 / npm@v1.0.0
  • initial release
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