lodash: changed _.isArguments() method

This commit is contained in:
Ilya Mochalov
2015-08-24 00:25:56 +05:00
parent af81415504
commit 61c54e2b00
2 changed files with 23 additions and 12 deletions
+6 -2
View File
@@ -1195,6 +1195,12 @@ result = <boolean>_(1).gte(2);
result = <boolean>_([]).gte(2);
result = <boolean>_({}).gte(2);
// _.isArguments
result = <boolean>_.isArguments(any);
result = <boolean>_(1).isArguments();
result = <boolean>_<any>([]).isArguments();
result = <boolean>_({}).isArguments();
// _.isArray
result = <boolean>_.isArray(any);
result = <boolean>_(1).isArray();
@@ -1437,8 +1443,6 @@ interface FirstSecond {
}
result = <FirstSecond>_.invert({ 'first': 'moe', 'second': 'larry' });
(function (...args: any[]) { return <boolean>_.isArguments(arguments); })(1, 2, 3);
result = <boolean>_.isBoolean(null);
result = <boolean>_.isDate(new Date());
+17 -10
View File
@@ -6162,6 +6162,23 @@ declare module _ {
gte(other: any): boolean;
}
//_.isArguments
interface LoDashStatic {
/**
* Checks if value is classified as an arguments object.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
*/
isArguments(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isArguments
*/
isArguments(): boolean;
}
//_.isArray
interface LoDashStatic {
/**
@@ -6959,16 +6976,6 @@ declare module _ {
invert(object: any): any;
}
//_.isArguments
interface LoDashStatic {
/**
* Checks if value is an arguments object.
* @param value The value to check.
* @return True if the value is an arguments object, else false.
**/
isArguments(value?: any): boolean;
}
//_.isBoolean
interface LoDashStatic {
/**