native-or-another
Advanced tools
Changelog
5.0.0 (2017-03-17)
Changelog
v4.0.0 - 2016-08-25
assertit
it with mukla
bluebird
from dependenciesThrows 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.
Changelog
v3.0.2 - 2016-01-13
Changelog
v3.0.1 - 2015-09-29
Changelog
v3.0.0 - 2015-09-29
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.
Changelog
v2.0.0 - 2014-12-21
Changelog
v1.0.0 - 2015-10-28