mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 01:35:51 +00:00
![]() Update ESLint to 3.0.0. This includes an enhancement to `no-unused-vars` such that it finds a few instances in our code base that it did not find previously (fixed in previous commits readying this for landing). PR-URL: https://github.com/nodejs/node/pull/7601 Reviewed-By: Michaël Zasso <mic.besace@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