MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / escapeRegex

Function escapeRegex

src/core/symbol-references.ts:36–38  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

34export type SymbolReferencesResult = SymbolReferencesSuccess | SymbolReferencesError;
35
36function escapeRegex(value: string): string {
37 return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
38}
39
40function getUsageFile(rootPath: string, chunk: IndexedChunk): string {
41 if (typeof chunk.relativePath === 'string' && chunk.relativePath.trim()) {

Callers 1

findSymbolReferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected