Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/escape-string-regexp/readme.md
rd565449 r0c6b92a 3 3 > Escape RegExp special characters 4 4 5 6 5 ## Install 7 6 8 7 ``` 9 $ npm install --saveescape-string-regexp8 $ npm install escape-string-regexp 10 9 ``` 11 12 10 13 11 ## Usage … … 16 14 const escapeStringRegexp = require('escape-string-regexp'); 17 15 18 const escapedString = escapeStringRegexp(' how much $ for a unicorn?');19 //=> ' how much \$ for a unicorn\?'16 const escapedString = escapeStringRegexp('How much $ for a 🦄?'); 17 //=> 'How much \\$ for a 🦄\\?' 20 18 21 19 new RegExp(escapedString); 22 20 ``` 23 21 22 You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. 24 23 25 ## License 24 --- 26 25 27 MIT © [Sindre Sorhus](http://sindresorhus.com) 26 <div align="center"> 27 <b> 28 <a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> 29 </b> 30 <br> 31 <sub> 32 Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. 33 </sub> 34 </div>
Note:
See TracChangeset
for help on using the changeset viewer.