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:
Current known failures:
node (v0.6 - v0.12, v4.0 - v6.3.1)io.js (all versions)v43 - v52, at least)v38 - v47, at least)v10 - v11)var getNaNs = require('get-nans');
var assert = require('assert');
var nans = getNaNs();
assert.deepEqual(nans, [NaN]);
Simply clone the repo, npm install, and run npm test