Merge pull request #5424 from chrootsu/lodash-isArray

lodash: changed _.isArray() method
This commit is contained in:
Masahiro Wakame
2015-08-21 22:09:43 +09:00
2 changed files with 23 additions and 13 deletions
+6 -3
View File
@@ -1145,6 +1145,12 @@ result = <boolean>_(1).gte(2);
result = <boolean>_([]).gte(2);
result = <boolean>_({}).gte(2);
// _.isArray
result = <boolean>_.isArray(any);
result = <boolean>_(1).isArray();
result = <boolean>_<any>([]).isArray();
result = <boolean>_({}).isArray();
// _.isEmpty
result = <boolean>_.isEmpty([1, 2, 3]);
result = <boolean>_.isEmpty({});
@@ -1377,9 +1383,6 @@ result = <FirstSecond>_.invert({ 'first': 'moe', 'second': 'larry' });
(function (...args: any[]) { return <boolean>_.isArguments(arguments); })(1, 2, 3);
(function () { return <boolean>_.isArray(arguments); })();
result = <boolean>_.isArray([1, 2, 3]);
result = <boolean>_.isBoolean(null);
result = <boolean>_.isDate(new Date());
+17 -10
View File
@@ -6080,6 +6080,23 @@ declare module _ {
gte(other: any): boolean;
}
//_.isArray
interface LoDashStatic {
/**
* Checks if value is classified as an Array object.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
**/
isArray(value?: any): boolean;
}
interface LoDashWrapperBase<T,TWrapper> {
/**
* @see _.isArray
*/
isArray(): boolean;
}
//_.isEmpty
interface LoDashStatic {
/**
@@ -6857,16 +6874,6 @@ declare module _ {
isArguments(value?: any): boolean;
}
//_.isArray
interface LoDashStatic {
/**
* Checks if value is an array.
* @param value The value to check.
* @return True if the value is an array, else false.
**/
isArray(value?: any): boolean;
}
//_.isBoolean
interface LoDashStatic {
/**