MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / fileLines

Function fileLines

src/resolution/pascal-scope.ts:1086–1088  ·  view source on GitHub ↗
(filePath: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

1084// ---------------------------------------------------------------------------
1085
1086function fileLines(filePath: string, context: ResolutionContext): string[] {
1087 return context.getFileLines?.(filePath) ?? context.readFile(filePath)?.split(/\r?\n/) ?? [];
1088}
1089
1090function escapeRegExp(s: string): string {
1091 return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');

Callers 10

isBareCallFunction · 0.85
declaredInRoutineFunction · 0.85
declaredUnderConditionFunction · 0.85
headerClassAtFunction · 0.85
declaredForwardFunction · 0.85
includesOfFunction · 0.85
classThroughAliasesFunction · 0.85
declaredTypeTextFunction · 0.85
aliasedTypeTextFunction · 0.85
routineKeywordFunction · 0.85

Calls 2

getFileLinesMethod · 0.80
readFileMethod · 0.65

Tested by

no test coverage detected