From 0b2232d9414d363e7e9a1ed238ea0c4394959b58 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 27 Aug 2015 06:16:17 +0500 Subject: [PATCH] lodash: changed _.isBoolean() method --- lodash/lodash-tests.ts | 8 ++++++-- lodash/lodash.d.ts | 27 +++++++++++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index bb7a665606..1cc61685b6 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1207,6 +1207,12 @@ result = _(1).isArray(); result = _([]).isArray(); result = _({}).isArray(); +// _.isBoolean +result = _.isBoolean(any); +result = _(1).isBoolean(); +result = _([]).isBoolean(); +result = _({}).isBoolean(); + // _.isDate result = _.isDate(any); result = _(42).isDate(); @@ -1473,8 +1479,6 @@ interface FirstSecond { } result = _.invert({ 'first': 'moe', 'second': 'larry' }); -result = _.isBoolean(null); - result = _.isElement(document.body); // _.isEqual (alias: _.eq) diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 43ba61f3b9..f4ba8e4285 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6196,6 +6196,23 @@ declare module _ { isArray(): boolean; } + //_.isBoolean + interface LoDashStatic { + /** + * Checks if value is classified as a boolean primitive or object. + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + **/ + isBoolean(value?: any): boolean; + } + + interface LoDashWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): boolean; + } + //_.isDate interface LoDashStatic { /** @@ -7063,16 +7080,6 @@ declare module _ { invert(object: any): any; } - //_.isBoolean - interface LoDashStatic { - /** - * Checks if value is a boolean value. - * @param value The value to check. - * @return True if the value is a boolean value, else false. - **/ - isBoolean(value?: any): boolean; - } - //_.isElement interface LoDashStatic { /**