May I use global.Promise=require("bluebird") ?
See original GitHub issueglobal.Promise=require("bluebird");
Is it suitable to replace the v8’s Promise implementation?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:46
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Using Bluebird Promises - Mastering JS
Even if you set global. Promise = require('bluebird'); , async functions will still return native promises.
Read more >Can I override ES6's Promise by bluebird's implementation in ...
var Promise = require("bluebird");. , which results in overriding the native Promise element. Because bluebird is a superset of the spec, it ...
Read more >Features - Bluebird JS
The usual way to use promises in node is to Promise. ... Most libraries can be promisified by requiring the library's classes (constructor...
Read more >Bluebird's Bad-Practice Docs. The Terrible Best ... - ITNEXT
There are plenty of promise libraries out there, but the one you'll see used in production, is Bluebird. It's a fantastic promise library ......
Read more >Enterprise-grade Node.js Promises with Async and Bluebird
Bluebird also contains a superset API that overlays the A+/Promise specification. Some of the APIs that do not exist in the native Promise...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No subclassing
Thanks @phpnode that makes a lot of sense. There are Babel tweaks like https://babeljs.io/docs/plugins/transform-async-to-module-method/ but that’s for the async/await polyfill specifically, no override. According to https://github.com/babel/babel-loader the only way might be:
(I don’t use Babel so I haven’t tested this.)