This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/@sinonjs/samsam/lib/is-nan.js

20 lines
466 B
JavaScript
Raw Permalink Normal View History

"use strict";
/**
* Compares a `value` to `NaN`
*
* @private
* @param {*} value A value to examine
* @returns {boolean} Returns `true` when `value` is `NaN`
*/
function isNaN(value) {
// Unlike global `isNaN`, this function avoids type coercion
// `typeof` check avoids IE host object issues, hat tip to
// lodash
// eslint-disable-next-line no-self-compare
return typeof value === "number" && value !== value;
}
module.exports = isNaN;