diff options
Diffstat (limited to 'node_modules/escape-string-regexp/readme.md')
-rw-r--r-- | node_modules/escape-string-regexp/readme.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md index 87ac82d5e..808a963a8 100644 --- a/node_modules/escape-string-regexp/readme.md +++ b/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 -const escapeStringRegexp = require('escape-string-regexp'); +var escapeStringRegexp = require('escape-string-regexp'); -const escapedString = escapeStringRegexp('how much $ for a unicorn?'); -//=> 'how much \$ for a unicorn\?' +var escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> how much \$ for a unicorn\? new RegExp(escapedString); ``` |