source: node_modules/es-toolkit/dist/string/escapeRegExp.d.ts@ ba17441

Last change on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 493 bytes
Line 
1/**
2 * Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`.
3 *
4 * @param {string} str The string to escape.
5 * @returns {string} Returns the escaped string.
6 *
7 * @example
8 * import { escapeRegExp } from 'es-toolkit/string';
9 *
10 * escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)'
11 */
12declare function escapeRegExp(str: string): string;
13
14export { escapeRegExp };
Note: See TracBrowser for help on using the repository browser.