17 lines
457 B
TypeScript
17 lines
457 B
TypeScript
|
|
//#region src/compat/predicate/isRegExp.d.ts
|
||
|
|
/**
|
||
|
|
* Checks if `value` is a RegExp.
|
||
|
|
*
|
||
|
|
* @param {any} value The value to check.
|
||
|
|
* @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
|
||
|
|
*
|
||
|
|
* @example
|
||
|
|
* const value1 = /abc/;
|
||
|
|
* const value2 = '/abc/';
|
||
|
|
*
|
||
|
|
* console.log(isRegExp(value1)); // true
|
||
|
|
* console.log(isRegExp(value2)); // false
|
||
|
|
*/
|
||
|
|
declare function isRegExp(value?: any): value is RegExp;
|
||
|
|
//#endregion
|
||
|
|
export { isRegExp };
|