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

Function methodsIn

__tests__/cpp-macro-defined-methods.test.ts:48–50  ·  view source on GitHub ↗

The methods of a file, as `qualifiedName:line`.

(cg: CodeGraph, file: string)

Source from the content-addressed store, hash-verified

46
47/** The methods of a file, as `qualifiedName:line`. */
48function methodsIn(cg: CodeGraph, file: string): string[] {
49 return cg.getNodesByKind('method').filter((n) => n.filePath === file).map((n) => `${n.qualifiedName}:${n.startLine}`).sort();
50}
51
52const lines = (...l: string[]): string => [...l, ''].join('\n');
53

Calls 2

mapMethod · 0.80
getNodesByKindMethod · 0.65

Tested by

no test coverage detected