lodash: changed _.isUndefined() method

This commit is contained in:
Ilya Mochalov
2015-08-20 01:33:02 +05:00
parent bb45306d0f
commit d34f2fd473
2 changed files with 23 additions and 12 deletions
+6 -2
View File
@@ -1172,6 +1172,12 @@ result = <boolean>_(Array.prototype.push).isNative();
result = <boolean>_.isTypedArray([]);
result = <boolean>_([]).isTypedArray();
// _.isUndefined
result = <boolean>_.isUndefined(any);
result = <boolean>_(1).isUndefined();
result = <boolean>_<any>([]).isUndefined();
result = <boolean>_({}).isUndefined();
// _.lt
result = <boolean>_.lt(1, 2);
result = <boolean>_(1).lt(2);
@@ -1431,8 +1437,6 @@ result = <boolean>_.isRegExp(/moe/);
result = <boolean>_.isString('moe');
result = <boolean>_.isUndefined(void 0);
result = <string[]>_.keys({ 'one': 1, 'two': 2, 'three': 3 });
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keys().value();
+17 -10
View File
@@ -6177,6 +6177,23 @@ declare module _ {
isTypedArray(): boolean;
}
//_.isUndefined
interface LoDashStatic {
/**
* Checks if value is undefined.
* @param value The value to check.
* @return Returns true if value is undefined, else false.
**/
isUndefined(value: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isUndefined
*/
isUndefined(): boolean;
}
//_.lt
interface LoDashStatic {
/**
@@ -7056,16 +7073,6 @@ declare module _ {
isString(value?: any): boolean;
}
//_.isUndefined
interface LoDashStatic {
/**
* Checks if value is undefined.
* @param value The value to check.
* @return True if the value is undefined, else false.
**/
isUndefined(value?: any): boolean;
}
//_.keys
interface LoDashStatic {
/**