From 399e7c6efce4f14e8b921d94c90e0f4ab4709cfb Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Sun, 20 Oct 2013 17:04:54 -0400 Subject: [PATCH] added _.isString definition --- lodash/lodash-tests.ts | 2 ++ lodash/lodash.d.ts | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 763cb126a..ed1cf22c9 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -649,6 +649,8 @@ result = _.isPlainObject({ 'name': 'moe', 'age': 40 }); result = _.isRegExp(/moe/); +result = _.isString('moe'); + var mergeNames = { 'stooges': [ { 'name': 'moe' }, diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 3d22c1497..eea18ec90 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2481,6 +2481,13 @@ declare module _ { **/ export function isRegExp(value: any): boolean; + /** + * Checks if value is a string. + * @param value The value to check. + * @return True if the value is a string, else false. + **/ + export function isString(value: any): boolean; + /** * Recursively merges own enumerable properties of the source object(s), that don't resolve * to undefined into the destination object. Subsequent sources will overwrite property @@ -2694,12 +2701,7 @@ declare module _ { **/ export function tap(object: T, intercepter: Function): T; - /** - * Returns true if object is a String. - * @param object Check if this object is a String. - * @return True if `object` is a String, otherwise false. - **/ - export function isString(object: any): boolean; + /** * Returns true if value is undefined.