diff options
Diffstat (limited to 'tools/eslint/node_modules/escape-string-regexp/readme.md')
-rw-r--r-- | tools/eslint/node_modules/escape-string-regexp/readme.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/eslint/node_modules/escape-string-regexp/readme.md b/tools/eslint/node_modules/escape-string-regexp/readme.md index 808a963a86..87ac82d5ef 100644 --- a/tools/eslint/node_modules/escape-string-regexp/readme.md +++ b/tools/eslint/node_modules/escape-string-regexp/readme.md @@ -5,7 +5,7 @@ ## Install -```sh +``` $ npm install --save escape-string-regexp ``` @@ -13,10 +13,10 @@ $ npm install --save escape-string-regexp ## Usage ```js -var escapeStringRegexp = require('escape-string-regexp'); +const escapeStringRegexp = require('escape-string-regexp'); -var escapedString = escapeStringRegexp('how much $ for a unicorn?'); -//=> how much \$ for a unicorn\? +const escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> 'how much \$ for a unicorn\?' new RegExp(escapedString); ``` |