New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-nan

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-nan

ES6-compliant shim for Number.isNaN - the global isNaN returns false positives.

1.2.1
Source
npm
Version published
Weekly downloads
6.9M
-2.48%
Maintainers
1
Weekly downloads
 
Created

What is is-nan?

The is-nan npm package is a simple utility that provides a reliable way to check if a value is NaN (Not-a-Number) in JavaScript. It is especially useful because it handles some edge cases that the global isNaN() function does not correctly address.

What are is-nan's main functionalities?

Check for NaN

This feature allows you to check if a value is NaN. It is more reliable than the native isNaN function because it correctly identifies only the values that are truly NaN, without coercion.

var isNaN = require('is-nan');
console.log(isNaN(NaN)); // true
console.log(isNaN('NaN')); // false
console.log(isNaN(0/0)); // true

Other packages similar to is-nan

Keywords

is

FAQs

Package last updated on 16 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts