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

Function calls

__tests__/cpp-global-alias-target.test.ts:43–49  ·  view source on GitHub ↗

`calls` callees of a function or method, as `qualifiedName`.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

41
42/** `calls` callees of a function or method, as `qualifiedName`. */
43function calls(cg: CodeGraph, caller: string): string[] {
44 return cg
45 .getCallees(callable(cg, caller).id)
46 .filter((r) => r.edge.kind === 'calls')
47 .map((r) => r.node.qualifiedName)
48 .sort();
49}
50
51const lines = (...l: string[]): string => [...l, ''].join('\n');
52

Callers 1

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected