From 5c4be3d2ae5fa3e81aa682733af238b1e335a656 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Wed, 26 Aug 2015 06:08:06 +0500 Subject: [PATCH] lodash: changed _.isNull() method --- lodash/lodash-tests.ts | 9 ++++++--- lodash/lodash.d.ts | 27 +++++++++++++++++---------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index bb7a66560..23edca934 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1260,6 +1260,12 @@ result = _(undefined).isNaN(); result = _.isNative(Array.prototype.push); result = _(Array.prototype.push).isNative(); +// _.isNull +result = _.isNull(any); +result = _(1).isNull(); +result = _([]).isNull(); +result = _({}).isNull(); + // _.isNumber result = _.isNumber(any); result = _(1).isNumber(); @@ -1502,9 +1508,6 @@ result = _(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn); result = _.eq(testEqArray, testEqOtherArray, testEqCustomizerFn); result = _(testEqArray).eq(testEqOtherArray, testEqCustomizerFn); -result = _.isNull(null); -result = _.isNull(undefined); - result = _.isObject({}); result = _.isObject([1, 2, 3]); result = _.isObject(1); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 43ba61f3b..03aacca50 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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 { + /** + * 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 { /**