File size: 528 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
/**
* 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;
|