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

Function calls

__tests__/cpp-binding-and-wrapper-receivers.test.ts:45–50  ·  view source on GitHub ↗

`calls` edges of a function or method, as `qualifiedName @confidence`, one per call.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

43
44/** `calls` edges of a function or method, as `qualifiedName @confidence`, one per call. */
45function calls(cg: CodeGraph, caller: string): string[] {
46 return cg
47 .getOutgoingEdgesFrom([callable(cg, caller).id], ['calls'])
48 .map((e) => `${cg.getNode(e.target)?.qualifiedName} @${(e.metadata as { confidence?: number } | undefined)?.confidence}`)
49 .sort();
50}
51
52const lines = (...text: string[]): string => [...text, ''].join('\n');
53

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
callableFunction · 0.70
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected