MCPcopy Create free account
hub / github.com/Snapchat/Valdi / escapeRegex

Function escapeRegex

npm_modules/cli/src/preview/viewModelParser.ts:141–143  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

139}
140
141function escapeRegex(str: string): string {
142 return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
143}

Callers 1

parseComponentFileFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected