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

Function calls

__tests__/cpp-map-iterator-calls.test.ts:38–44  ·  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

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

Callers 1

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected