Repository URL to install this package:
|
Version:
6.0.4 ▾
|
import escapeStringRegExp from '../escapeRegExp'
test('excape string regexp', () => {
const actual = escapeStringRegExp('\\ ^ $ * + ? . ( ) | { } [ ]')
const escaped = '\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]'
expect(actual).toEqual(escaped)
})