MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / isDefinitionLine

Function isDefinitionLine

src/tools/blast-radius.ts:79–85  ·  view source on GitHub ↗
(line: string, symbolName: string)

Source from the content-addressed store, hash-verified

77}
78
79function isDefinitionLine(line: string, symbolName: string): boolean {
80 const definitionPatterns = [
81 new RegExp(`(?:function|class|enum|interface|struct|type|trait|fn|def|func)\\s+${escapeRegex(symbolName)}`),
82 new RegExp(`(?:const|let|var|pub|export)\\s+(?:async\\s+)?(?:function\\s+)?${escapeRegex(symbolName)}`),
83 ];
84 return definitionPatterns.some((p) => p.test(line));
85}

Callers 1

getBlastRadiusFunction · 0.70

Calls 1

escapeRegexFunction · 0.70

Tested by

no test coverage detected