The documentation shows good and bad examples in two large blocks, but this means that finding the right way to do things takes longer than necessary. I'd suggest this format:
❌ if (Object.is(foo, NaN)) {}
✅if (Object.is(foo, Number.NaN)) {}
❌ isNan(1)
✅ Number.isNaN(1)
⚠️ These are not equivalent, you might want this instead:
✅ if (typeof numberOrIdk !== number || Number.isNaN(numberOrIdk)) {
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too