Re:A one-line package broke `npm create-react-app`
by ehsankia on Saturday April 25, 2020 @02:01PM
(#22979898)
Or just:
[ Parent
| on HN ]
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'.