News for hackers. Stuff that matters.
Re:A one-line package broke `npm create-react-app` by mikewhy on Saturday April 25, 2020 @01:48PM (#22979782)
> Or, really, part of standard js, maybe.see:

It's a part of node, at least: https://nodejs.org/docs/latest-v12.x/api/util.html#util_util...

Re:A one-line package broke `npm create-react-app` by staticassertion on Saturday April 25, 2020 @01:50PM (#22979796)
This will work for a standard Promise, which is great, but not for weirdo made up promises. It also was released, I think, in 2018.

It's one thing if you own the entire codebase, but if you're building a popular, multiple-years-old library/framework, you can't make the same assumptions.

Re:A one-line package broke `npm create-react-app` by mikewhy on Saturday April 25, 2020 @02:23PM (#22980066)
I'm only finding about it today TBH. Usually I go for what this library does:

  function isPromise(obj) {
    return typeof obj?.then === 'function'
  }