Merge pull request #5512 from chrootsu/lodash-isFunction

lodash: changed _.isFunction() method
This commit is contained in:
Masahiro Wakame
2015-08-26 01:50:48 +09:00
2 changed files with 23 additions and 12 deletions
+6 -2
View File
@@ -1233,6 +1233,12 @@ result = <boolean>_(1).isFinite();
result = <boolean>_<any>([]).isFinite();
result = <boolean>_({}).isFinite();
// _.isFunction
result = <boolean>_.isFunction(any);
result = <boolean>_(1).isFunction();
result = <boolean>_<any>([]).isFunction();
result = <boolean>_({}).isFunction();
// _.isMatch
var testIsMatchCustiomizerFn: (value: any, other: any, indexOrKey: number|string) => boolean;
result = <boolean>_.isMatch({}, {});
@@ -1496,8 +1502,6 @@ result = <boolean>_(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.eq(testEqArray, testEqOtherArray, testEqCustomizerFn);
result = <boolean>_(testEqArray).eq(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.isFunction(_);
result = <boolean>_.isNull(null);
result = <boolean>_.isNull(undefined);
+17 -10
View File
@@ -6267,6 +6267,23 @@ declare module _ {
isFinite(): boolean;
}
//_.isFunction
interface LoDashStatic {
/**
* Checks if value is classified as a Function object.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
**/
isFunction(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isFunction
*/
isFunction(): boolean;
}
//_.isMatch
interface isMatchCustomizer {
(value: any, other: any, indexOrKey?: number|string): boolean;
@@ -7146,16 +7163,6 @@ declare module _ {
thisArg?: any): boolean;
}
//_.isFunction
interface LoDashStatic {
/**
* Checks if value is a function.
* @param value The value to check.
* @return True if the value is a function, else false.
**/
isFunction(value?: any): boolean;
}
//_.isNull
interface LoDashStatic {
/**