Deprecated as this is now natively available in all modern browsers and Node.js versions.
ES2015
Number.isNaN()
ponyfill
npm install number-is-nan
const numberIsNan = require('number-is-nan');
numberIsNan(NaN);
//=> true
numberIsNan('unicorn');
//=> false