UNPKG

@technobuddha/library

Version:
17 lines (16 loc) 478 B
/** * 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;