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

Function callable

__tests__/cpp-element-access-calls.test.ts:32–36  ·  view source on GitHub ↗
(cg: CodeGraph, qualifiedName: string)

Source from the content-addressed store, hash-verified

30}
31
32function callable(cg: CodeGraph, qualifiedName: string): Node {
33 const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName);
34 if (!node) throw new Error(`no function or method ${qualifiedName}`);
35 return node;
36}
37
38/** `calls` callees of a function or method, as `qualifiedName`. */
39function calls(cg: CodeGraph, caller: string): string[] {

Callers 2

callsFunction · 0.70
callsAtFunction · 0.70

Calls 1

getNodesByKindMethod · 0.65

Tested by

no test coverage detected