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

Function callsOf

__tests__/param-default-calls.test.ts:181–187  ·  view source on GitHub ↗

`caller kind callee` for every call and `new` the file records, by its caller's qualified name.

(result: ExtractionResult)

Source from the content-addressed store, hash-verified

179
180 /** `caller kind callee` for every call and `new` the file records, by its caller's qualified name. */
181 function callsOf(result: ExtractionResult): string[] {
182 const names = new Map(result.nodes.map((n) => [n.id, n.kind === 'file' ? n.filePath : n.qualifiedName]));
183 return result.unresolvedReferences
184 .filter((r) => r.referenceKind === 'calls' || r.referenceKind === 'instantiates')
185 .map((r) => `${names.get(r.fromNodeId)} ${r.referenceKind} ${r.referenceName}`)
186 .sort();
187 }
188
189 const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const);
190

Callers 1

Calls 2

mapMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected