diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index fe5a8a0578..75185f8984 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1254,6 +1254,12 @@ result = _(1).isRegExp(); result = _([]).isRegExp(); result = _({}).isRegExp(); +// _.isString +result = _.isString(any); +result = _(1).isString(); +result = _([]).isString(); +result = _({}).isString(); + // _.isTypedArray result = _.isTypedArray([]); result = _([]).isTypedArray(); @@ -1500,8 +1506,6 @@ result = _.isPlainObject(new Stooge('moe', 40)); result = _.isPlainObject([1, 2, 3]); result = _.isPlainObject({ 'name': 'moe', 'age': 40 }); -result = _.isString('moe'); - result = _.keys({ 'one': 1, 'two': 2, 'three': 3 }); result = _({ 'one': 1, 'two': 2, 'three': 3 }).keys().value(); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index cf5717666b..772b6bc32e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6329,6 +6329,23 @@ declare module _ { isRegExp(): boolean; } + //_.isString + interface LoDashStatic { + /** + * Checks if value is classified as a String primitive or object. + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + **/ + isString(value?: any): boolean; + } + + interface LoDashWrapperBase { + /** + * see _.isString + */ + isString(): boolean; + } + //_.isTypedArray interface LoDashStatic { /** @@ -7156,16 +7173,6 @@ declare module _ { isPlainObject(value?: any): boolean; } - //_.isString - interface LoDashStatic { - /** - * Checks if value is a string. - * @param value The value to check. - * @return True if the value is a string, else false. - **/ - isString(value?: any): boolean; - } - //_.keys interface LoDashStatic { /**