Natural Pacifist Manatees
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

get-nans

1.1.0 • Public • Published

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 known failures:

  • node (v0.6 - v0.12)
  • io.js (v1.0 - v2.2)
  • Chrome (v43 - v45, at least)
  • Firefox (v38 - v41, at least)
  • Internet Explorer (v10, v11)

Example

var getNaNs = require('get-nans');
var assert = require('assert');
 
var nans = getNaNs();
assert.deepEqual(nans, [NaN]);

Relevant links

Tests

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

install

npm i get-nans

Downloadsweekly downloads

1

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability