28b7281f2fe0315c37cbf15dd29974605b623e686fa75ec206d5f692348220e836e96ad2035c432a947841faa48e13cb9e37e2cda2a85f0c28ab20cf12e38d 437 B

12345678910111213141516
  1. /**
  2. Escape RegExp special characters.
  3. You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
  4. @example
  5. ```
  6. import escapeStringRegexp from 'escape-string-regexp';
  7. const escapedString = escapeStringRegexp('How much $ for a 🦄?');
  8. //=> 'How much \\$ for a 🦄\\?'
  9. new RegExp(escapedString);
  10. ```
  11. */
  12. export default function escapeStringRegexp(string: string): string;