node/tools/eslint/node_modules/escape-string-regexp
Rich Trott 7a8dd69e1c tools: update ESLint to 2.9.0
ESLint 2.9.0 fixes some minor bugs that we have been experiencing and
introduces some new rules that we may wish to consider.

PR-URL: https://github.com/nodejs/node/pull/6498
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-04 10:26:25 -07:00
..
index.js tools: update eslint to v1.10.3 2016-01-13 23:15:39 +01:00
license tools: replace closure-linter with eslint 2015-05-09 12:09:52 +09:00
package.json tools: update ESLint to 2.9.0 2016-05-04 10:26:25 -07:00
readme.md tools: update eslint to v1.10.3 2016-01-13 23:15:39 +01:00

escape-string-regexp Build Status

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