MCPcopy Create free account
hub / github.com/backnotprop/plannotator / escapeRegex

Function escapeRegex

packages/shared/code-nav.ts:144–146  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

142// ---------------------------------------------------------------------------
143
144function escapeRegex(str: string): string {
145 return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
146}
147
148function sameDirectory(a: string, b: string): boolean {
149 const dirA = a.lastIndexOf("/");

Callers 2

buildRgArgsFunction · 0.70
classifyMatchFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected