Promise is now a global reserved word in es6 and linters throw a error. So what are the pitfalls of doing this
var Promise = require("bluebird");
or should i do
var BluebirdPromise = require("bluebird");
Looks like there isn't a problem to redeclaring promise as long as it's not global. But second one is a better approach
Many of us do that. There's no problem. You're just using a faster implementation, that's all. But note that you may use more and more promises given by various libraries, so this is a very limited replacement (there are discussions in the node world about ways to define a library as a global promise provider). – Denys Séguret
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With