added _.isFinite definition

This commit is contained in:
Brian Zengel
2013-10-20 16:36:10 -04:00
parent 3b13bf7436
commit 4538afe4e8
2 changed files with 15 additions and 9 deletions
+5
View File
@@ -617,6 +617,11 @@ result = <boolean>_.isEqual(words, otherWords, function(a, b) {
return (aGreet || bGreet) ? (aGreet == bGreet) : undefined;
});
result = <boolean>_.isFinite(-101);
result = <boolean>_.isFinite('10');
result = <boolean>_.isFinite(true);
result = <boolean>_.isFinite('');
result = <boolean>_.isFinite(Infinity);
var mergeNames = {
'stooges': [
+10 -9
View File
@@ -2416,6 +2416,16 @@ declare module _ {
callback?: (a, b) => boolean,
thisArg?: any): boolean;
/**
* Checks if value is, or can be coerced to, a finite number.
*
* Note: This is not the same as native isFinite which will return true for booleans and empty
* strings. See http://es5.github.io/#x15.1.2.5.
* @param value The value to check.
* @return True if the value is finite, else false.
**/
export function isFinite(value: any): boolean;
/**
* Recursively merges own enumerable properties of the source object(s), that don't resolve
* to undefined into the destination object. Subsequent sources will overwrite property
@@ -2664,15 +2674,6 @@ declare module _ {
**/
export function isNumber(object: any): boolean;
/**
* Returns true if object is a finite Number.
* @param object Check if this object is a finite Number.
* @return True if `object` is a finite Number.
**/
export function isFinite(object: any): boolean;
/**
* Returns true if object is a RegExp.
* @param object Check if this object is a RegExp.