0.1.9 • Published 2 years ago

@wareset-utilites/escape v0.1.9

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

@wareset-utilites/escape

Escape regexp

Usage

import esc from '@wareset-utilites/escape';
Method: escape(string: String, ignoreSymbols: String, isNewFn: Boolean)
const str = `{[()]}`;
console.log(esc(str)); // \\{\\[\\(\\)\\]\\}
console.log(esc(str, '{()}')); // {\\[()\\]}

// if exists 'ignoreSymbols' and 'isNewFn' is true:
const newEsc = esc(null, '{()}', true);
console.log(newEsc(str)); // {\\[()\\]}

License

MIT

0.1.9

2 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

4 years ago