News for hackers. Stuff that matters.
Re:A one-line package broke `npm create-react-app` by stagas on Saturday April 25, 2020 @04:06PM (#22980995)
And it doesn't even check if it's a Promise. It's violating it's own naming contract. At least it should be called: isPromiseLike? To check if something is actually a Promise all you need to do is a `foo instanceof Promise`.
Re:A one-line package broke `npm create-react-app` by exogen on Saturday April 25, 2020 @05:55PM (#22981919)
That won't work across window boundaries, since each window environment gets its own distinct version of Promise.
Re:A one-line package broke `npm create-react-app` by stagas on Sunday April 26, 2020 @02:00AM (#22984903)
Then instanceof will break for all native objects. Who writes code that checks instances across window boundaries? This is flawed beyond the idea of how to properly check an instance, it's bad architecture - the result? This post, and probably more subtle bugs surfacing along the way.