# is-nan-x
**Repository Path**: ArkTSCentralRepository/is-nan-x
## Basic Information
- **Project Name**: is-nan-x
- **Description**: ES6-compliant shim for Number.isNaN - the global isNaN returns false positives.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-03-28
- **Last Updated**: 2026-03-28
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# is-nan-x
基于[is-nan-x](https://www.npmjs.com/package/is-nan-x)原库2.1.1版本进行适配
## Install
```sh
ohpm install is-nan-x
```
## Usage
ES6-compliant shim for Number.isNaN - the global isNaN returns false positives.
### `module.exports(value)` ⇒ boolean ⏏
This method determines whether the passed value is NaN and its type is
`Number`. It is a more robust version of the original, global isNaN().
**Kind**: Exported function
**Returns**: boolean - `true` if the given value is NaN and its type is Number;
otherwise, `false`.
| Param | Type | Description |
| ----- | --------------- | ------------------------------- |
| value | \* | The value to be tested for NaN. |
**Example**
```typescript
import numberIsNaN from 'is-nan-x';
console.log(numberIsNaN(NaN)); // true
console.log(numberIsNaN(Number.NaN)); // true
console.log(numberIsNaN(0 / 0)); // true
// e.g. these would have been true with global isNaN()
console.log(numberIsNaN('NaN')); // false
console.log(numberIsNaN(undefined)); // false
console.log(numberIsNaN(new Object())); // false
console.log(numberIsNaN('blabla')); // false
// These all return false
console.log(numberIsNaN(true));
console.log(numberIsNaN(null));
console.log(numberIsNaN(37));
console.log(numberIsNaN('37'));
console.log(numberIsNaN('37.37'));
console.log(numberIsNaN(''));
console.log(numberIsNaN(' '));
```