Socket
Book a DemoInstallSign in
Socket

get-nans

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-nans

Get an array of all distinct NaN values supported by the engine. There can be only one!

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

get-nans Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

JavaScript should only have one distinguishable NaN value. However, some engines violate this, and have at least two.

This module returns an array of all the NaNs it knows how to detect on the current engine.

Current engines with only one observable NaN value:

  • Edge v14

Current known failures:

  • node (v0.6 - v0.12, v4.0 - v6.3.1)
  • io.js (all versions)
  • Chrome (v43 - v52, at least)
  • Firefox (v38 - v47, at least)
  • Internet Explorer (v10 - v11)

Example

var getNaNs = require('get-nans');
var assert = require('assert');

var nans = getNaNs();
assert.deepEqual(nans, [NaN]);

Tests

Simply clone the repo, npm install, and run npm test

Keywords

NaN

FAQs

Package last updated on 24 Jan 2020

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