codeMan f03f940133 2023-6-20 há 2 anos atrás
..
index.js f03f940133 2023-6-20 há 2 anos atrás
license f03f940133 2023-6-20 há 2 anos atrás
package.json f03f940133 2023-6-20 há 2 anos atrás
readme.md f03f940133 2023-6-20 há 2 anos atrás

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