diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index ff8141821..763cb126a 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -647,6 +647,8 @@ result = _.isPlainObject(new Stooge('moe', 40)); result = _.isPlainObject([1, 2, 3]); result = _.isPlainObject({ 'name': 'moe', 'age': 40 }); +result = _.isRegExp(/moe/); + var mergeNames = { 'stooges': [ { 'name': 'moe' }, diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 0bc4bca92..3d22c1497 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2474,6 +2474,13 @@ declare module _ { **/ export function isPlainObject(value: any): boolean; + /** + * Checks if value is a regular expression. + * @param value The value to check. + * @return True if the value is a regular expression, else false. + **/ + export function isRegExp(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,13 +2701,6 @@ declare module _ { **/ export function isString(object: any): boolean; - /** - * Returns true if object is a RegExp. - * @param object Check if this object is a RegExp. - * @return True if `object` is a RegExp, otherwise false. - **/ - export function isRegExp(object: any): boolean; - /** * Returns true if value is undefined. * @param object Check if this object is undefined.