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

Function callable

__tests__/cpp-nested-template-receiver.test.ts:38–42  ·  view source on GitHub ↗
(cg: CodeGraph, qualifiedName: string)

Source from the content-addressed store, hash-verified

36}
37
38function callable(cg: CodeGraph, qualifiedName: string): Node {
39 const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName);
40 if (!node) throw new Error(`no function or method ${qualifiedName}`);
41 return node;
42}
43
44/** `calls` callees of a function or method, as `qualifiedName (file)`. */
45function calls(cg: CodeGraph, caller: string): string[] {

Callers 3

callsFunction · 0.70
resolvedCallsFunction · 0.70

Calls 1

getNodesByKindMethod · 0.65

Tested by

no test coverage detected