@technobuddha/library
Version: 
A large library of useful functions
17 lines (16 loc) • 478 B
TypeScript
/**
 * Determines whether the provided value is a `RegExp` object.
 * @param value - The value to test.
 * @returns `true` if the value is a `RegExp` object; otherwise, `false`.
 * @group Object
 * @category Type Guards
 * @example
 * ```typescript
 * isRegExp(/abc/); // true
 * isRegExp(new RegExp('abc')); // true
 * isRegExp('abc'); // false
 * isRegExp({}); // false
 * isRegExp(null); // false
 * ```
 */
export declare function isRegExp(value: unknown): value is RegExp;