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

Function calls

__tests__/cpp-iterator-arrow.test.ts:37–43  ·  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

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

Callers 1

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected