mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 01:35:51 +00:00
![]() Update ESLint to v3.8.0. * Installed with `npm install --production` to avoid installing unnecessary dev files * Used `dmn -f clean` to further eliminate unneeded files PR-URL: https://github.com/nodejs/node/pull/9112 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> |
||
---|---|---|
.. | ||
index.js | ||
license | ||
package.json | ||
readme.md |
escape-string-regexp 
Escape RegExp special characters
Install
$ npm install --save escape-string-regexp
Usage
const escapeStringRegexp = require('escape-string-regexp');
const escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> 'how much \$ for a unicorn\?'
new RegExp(escapedString);
License
MIT © Sindre Sorhus