X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;ds=sidebyside;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fescape-string-regexp%2Freadme.md;h=2945dfcb23ea118a6f7abeb12741d139a92eecb0;hb=3be0a9efc698a9570a44456009afc6014812625a;hp=87ac82d5ef8bc9515f709cf0dffe4c7a6fb84f93;hpb=d2f432cc757f42f0318fdddcab8c00b240d47088;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/escape-string-regexp/readme.md b/.config/coc/extensions/node_modules/coc-prettier/node_modules/escape-string-regexp/readme.md index 87ac82d5..2945dfcb 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/escape-string-regexp/readme.md +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/escape-string-regexp/readme.md @@ -2,26 +2,33 @@ > Escape RegExp special characters - ## Install ``` -$ npm install --save escape-string-regexp +$ npm install escape-string-regexp ``` - ## Usage ```js const escapeStringRegexp = require('escape-string-regexp'); -const escapedString = escapeStringRegexp('how much $ for a unicorn?'); -//=> 'how much \$ for a unicorn\?' +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' new RegExp(escapedString); ``` +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. -## License +--- -MIT © [Sindre Sorhus](http://sindresorhus.com) +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+