Hacker GitHub

← All repos

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

Mentions per year 11 mentions · busiest year 2020 (10)
20082026
  1. …upside than liability; it's everything in the medium range that you really need to consider. [0]: https://github.com/then/is-promise/blob/ec9bd8a3f576324a1343...
    comment by xavdid · 2022-11-18 · in Go Style
  2. …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
  3. …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 .
  4. …!!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; https://github.com/then/is-promise/blob/master/index.js This is insane
  5. 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.
  6. …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
  7. The the broken package just released a fix: https://github.com/then/is-promise/releases/tag/2.2.1
  8. And the ways you can fund it are here: https://github.com/then/is-promise/blob/master/.github/FUNDI...
  9. 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…
  10. …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)