News for hackers. Stuff that matters.
Re:A one-line package broke `npm create-react-app` by TurplePurtle on Saturday April 25, 2020 @01:58PM (#22979869)
There are custom Promise implementations (for reasons), such as bluebird.js. If you're supporting legacy browsers, there will be no standard Promise object. So the simplest way to check for the Promise contract is the code posted. But yes, in an ideal world, one would be able to just do `promise instanceof Promise`.
Re:A one-line package broke `npm create-react-app` by stagas on Saturday April 25, 2020 @04:09PM (#22981013)
These cases should really be handled at the compilation/transpilation level, since there is one, and users should just write latest generation JavaScript without these concerns.