mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Bump to v4.7.0.
This commit is contained in:
9
isNaN.js
9
isNaN.js
@@ -3,11 +3,13 @@ define(['./isNumber'], function(isNumber) {
|
||||
/**
|
||||
* Checks if `value` is `NaN`.
|
||||
*
|
||||
* **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
|
||||
* which returns `true` for `undefined` and other non-numeric values.
|
||||
* **Note:** This method is not the same as
|
||||
* [`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for
|
||||
* `undefined` and other non-numeric values.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
||||
@@ -27,7 +29,8 @@ define(['./isNumber'], function(isNumber) {
|
||||
*/
|
||||
function isNaN(value) {
|
||||
// An `NaN` primitive is the only value that is not equal to itself.
|
||||
// Perform the `toStringTag` check first to avoid errors with some ActiveX objects in IE.
|
||||
// Perform the `toStringTag` check first to avoid errors with some
|
||||
// ActiveX objects in IE.
|
||||
return isNumber(value) && value != +value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user