News for hackers. Stuff that matters.
Re:NPM – "is-even", 160k weekly downloads by Ajedi32 on Tuesday November 16, 2021 @11:51AM (#29242815)
See the MDN section on "confusing special case behavior"[1] for why they probably didn't want to use the global version of isNaN. Number.isNaN handles those cases better but is not as widely supported.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:NPM – "is-even", 160k weekly downloads by jazzyjackson on Tuesday November 16, 2021 @12:07PM (#29243107)
Thanks for this, I had forgot that empty strings get coerced to 0... interesting choice.