lodash: changed _.isNaN() method

This commit is contained in:
Ilya Mochalov
2015-08-15 23:05:59 +05:00
parent 5109e1269d
commit 87c59a50db
2 changed files with 26 additions and 17 deletions
+8 -4
View File
@@ -1071,6 +1071,14 @@ result = <boolean>_({}).isMatch({});
result = <boolean>_({}).isMatch({}, testIsMatchCustiomizerFn);
result = <boolean>_({}).isMatch({}, testIsMatchCustiomizerFn, {});
// _.isNaN
result = <boolean>_.isNaN(NaN);
result = <boolean>_.isNaN(new Number(NaN));
result = <boolean>_.isNaN(undefined);
result = <boolean>_(NaN).isNaN();
result = <boolean>_(new Number(NaN)).isNaN();
result = <boolean>_(undefined).isNaN();
// _.isNative
result = <boolean>_.isNative(Array.prototype.push);
result = <boolean>_(Array.prototype.push).isNative();
@@ -1309,10 +1317,6 @@ result = <boolean>_.isFinite(Infinity);
result = <boolean>_.isFunction(_);
result = <boolean>_.isNaN(NaN);
result = <boolean>_.isNaN(new Number(NaN));
result = <boolean>_.isNaN(undefined);
result = <boolean>_.isNull(null);
result = <boolean>_.isNull(undefined);
+18 -13
View File
@@ -5888,6 +5888,24 @@ declare module _ {
isMatch(source: Object, customizer?: isMatchCustomizer, thisArg?: any): boolean;
}
//_.isNaN
interface LoDashStatic {
/**
* Checks if value is NaN.
* Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values.
* @param value The value to check.
* @return Returns true if value is NaN, else false.
*/
isNaN(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isNaN
*/
isNaN(): boolean;
}
//_.isNative
interface LoDashStatic {
/**
@@ -6719,19 +6737,6 @@ declare module _ {
isFunction(value?: any): boolean;
}
//_.isNaN
interface LoDashStatic {
/**
* Checks if value is NaN.
*
* Note: This is not the same as native isNaN which will return true for undefined and other
* non-numeric values. See http://es5.github.io/#x15.1.2.4.
* @param value The value to check.
* @return True if the value is NaN, else false.
**/
isNaN(value?: any): boolean;
}
//_.isNull
interface LoDashStatic {
/**