lunaisadev-website-old/node_modules/escape-string-regexp
Luna 4f63b4f9a0 first commit 2021-07-27 18:40:12 -07:00
..
index.js first commit 2021-07-27 18:40:12 -07:00
license first commit 2021-07-27 18:40:12 -07:00
package.json first commit 2021-07-27 18:40:12 -07:00
readme.md first commit 2021-07-27 18:40:12 -07:00

readme.md

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