source:
node_modules/es-toolkit/dist/string/escapeRegExp.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 112 bytes | |
| Line | |
|---|---|
| 1 | function escapeRegExp(str) { |
| 2 | return str.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'); |
| 3 | } |
| 4 | |
| 5 | export { escapeRegExp }; |
Note:
See TracBrowser
for help on using the repository browser.
