then/is-promise
View on GitHub ↗ ★ 282 JavaScript
Test whether an object looks like a promises-a+ promise
11 mentions on Hacker News by 11 people: 1 story, 10 comments · first 2020-04-25 · latest 2022-11-18
20082026
-
…but it's reliably filling a super important niche that the language doesn't handle. [1]: https://github.com/then/is-promise/blob/1d547300e780a4eca391...
comment by Xavdidtheshadow · 2020-06-29 · in Worrying about the NPM Ecosystem -
…referring to the TypeScript declaration file as the "raw source code". The actual implementation is https://github.com/then/is-promise/blob/master/index.js .
comment by JMTQp8lwXL · 2020-04-27 · in Another one line NPM package breaks the JavaScript ecosystem -
…!!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; https://github.com/then/is-promise/blob/master/index.js This is insane
comment by biglost · 2020-04-26 · in A one-line package broke `npm create-react-app` -
Do you also copy/paste the tests? https://github.com/then/is-promise/blob/master/test.js . Just curious, sometimes it's really not just about the code but that it's continuously tested as well.
comment by gramakri · 2020-04-25 · in A one-line package broke `npm create-react-app` -
…a 3.5-hour release and a sub-minute release) [0], so they may not have wanted to dig into CI. [0] https://github.com/then/is-promise/releases
comment by jessaustin · 2020-04-25 · in A one-line package broke `npm create-react-app` -
The the broken package just released a fix: https://github.com/then/is-promise/releases/tag/2.2.1
comment by kingbirdy · 2020-04-25 · in A one-line package broke `npm create-react-app` -
And the ways you can fund it are here: https://github.com/then/is-promise/blob/master/.github/FUNDI...
comment by bronson · 2020-04-25 · in A one-line package broke `npm create-react-app` -
Digging into the reason behind breakage, the change is this one: https://github.com/then/is-promise/commit/feb90a40501c8ef69b... Which adds support for ES modules: https://medium.com/@nodejs/announcing-core-node-js-support-f... However the…
comment by gav · 2020-04-25 · in A one-line package broke `npm create-react-app` -
…the test matrix does not cover the latest node versions (which are the ones that are affected). See https://github.com/then/is-promise/blob/master/.travis.yml (missing v11, v12, v13, v14)
comment by SSchick · 2020-04-25 · in A one-line package broke `npm create-react-app` -
▲ 599
A one-line package broke `npm create-react-app`story by tessela · 2020-04-25 · 459 comments