timepiece/node_modules/escape-string-regexp
2024-05-14 09:54:12 -05:00
..
index.js Initial code commit 2024-05-14 09:54:12 -05:00
license Initial code commit 2024-05-14 09:54:12 -05:00
package.json Initial code commit 2024-05-14 09:54:12 -05:00
readme.md Initial code commit 2024-05-14 09:54:12 -05: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