v0.0.1
Escape RegExp special characters
Repository
Current version released
4 years ago
Versions
Ported from https://github.com/sindresorhus/escape-string-regexp
escape-string-regexp
Escape RegExp special characters
Usage
import { escapeStringRegexp } from 'https://raw.githubusercontent.com/Sab94/escape-string-regexp/master/mod.ts'
const a = escapeStringRegexp('\\ ^ $ * + ? . ( ) | { } [ ]');
console.log(a)
//result: '\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]'
License
MIT