ObjectisNaN
ObjectisNaN is a utility function that was introduced to provide a reliable way of determining whether a value is NaN (Not a Number) in the JavaScript programming language. It is implemented as a static method on the Object constructor, mirroring the style of other Object utility functions such as Object.assign and Object.is. The function accepts a single argument and returns true only when the argument is the primitive NaN value; any other falsy value or non‑numeric type yields false.
The motivation behind ObjectisNaN was to address inconsistencies in the global isNaN function, which coerces its
Implementation got widespread use in polyfill libraries such as core‑js, where it was added as part of
The function’s signature is simple:
where the return value is a boolean. It is intended for use in code paths that require