News for hackers. Stuff that matters.
Re:A one-line package broke `npm create-react-app` by hombre_fatal on Sunday April 26, 2020 @01:37PM (#22988693)
Well, an object with a then() method is a promise.

Promise.resolve({then: () => console.log('called')})

Promises autoflatten since you can't have Promise<Promise<T>>, so you'll see that this code prints 'called'.

There are no comments on this comment yet.