EITS-web/node_modules/eslint-plugin-svelte/lib/utils/regexp.d.ts
2025-12-06 09:54:52 -05:00

18 lines
528 B
TypeScript

/**
* Convert a string to the `RegExp`.
* Normal strings (e.g. `"foo"`) is converted to `/^foo$/` of `RegExp`.
* Strings like `"/^foo/i"` are converted to `/^foo/i` of `RegExp`.
*
* @param {string} string The string to convert.
* @returns {RegExp} Returns the `RegExp`.
*/
export declare function toRegExp(string: string): {
test(s: string): boolean;
};
/**
* Checks whether given string is regexp string
* @param {string} string
* @returns {boolean}
*/
export declare function isRegExp(string: string): boolean;