Merge pull request #5380 from chrootsu/lodash-isNaN

lodash: changed _.isNaN() method
This commit is contained in:
Masahiro Wakame
2015-08-17 23:20:53 +09:00
2 changed files with 26 additions and 17 deletions
+8 -4
View File
@@ -1076,6 +1076,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();
@@ -1320,10 +1328,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
@@ -5909,6 +5909,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 {
/**
@@ -6764,19 +6782,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 {
/**