lodash: changed _.isNull() method

This commit is contained in:
Ilya Mochalov
2015-08-26 06:08:06 +05:00
parent eb835aa72f
commit 5c4be3d2ae
2 changed files with 23 additions and 13 deletions

View File

@@ -1260,6 +1260,12 @@ result = <boolean>_(undefined).isNaN();
result = <boolean>_.isNative(Array.prototype.push);
result = <boolean>_(Array.prototype.push).isNative();
// _.isNull
result = <boolean>_.isNull(any);
result = <boolean>_(1).isNull();
result = <boolean>_<any>([]).isNull();
result = <boolean>_({}).isNull();
// _.isNumber
result = <boolean>_.isNumber(any);
result = <boolean>_(1).isNumber();
@@ -1502,9 +1508,6 @@ result = <boolean>_(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.eq(testEqArray, testEqOtherArray, testEqCustomizerFn);
result = <boolean>_(testEqArray).eq(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.isNull(null);
result = <boolean>_.isNull(undefined);
result = <boolean>_.isObject({});
result = <boolean>_.isObject([1, 2, 3]);
result = <boolean>_.isObject(1);

27
lodash/lodash.d.ts vendored
View File

@@ -6346,6 +6346,23 @@ declare module _ {
isNative(): boolean;
}
//_.isNull
interface LoDashStatic {
/**
* Checks if value is null.
* @param value The value to check.
* @return Returns true if value is null, else false.
**/
isNull(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isNull
*/
isNull(): boolean;
}
//_.isNumber
interface LoDashStatic {
/**
@@ -7163,16 +7180,6 @@ declare module _ {
thisArg?: any): boolean;
}
//_.isNull
interface LoDashStatic {
/**
* Checks if value is null.
* @param value The value to check.
* @return True if the value is null, else false.
**/
isNull(value?: any): boolean;
}
//_.isObject
interface LoDashStatic {
/**