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

Function outOf

__tests__/rust-macro-function-values.test.ts:377–385  ·  view source on GitHub ↗

`kind target` for each call and reference out of the function or method `name`, sorted.

(name: string)

Source from the content-addressed store, hash-verified

375
376 /** `kind target` for each call and reference out of the function or method `name`, sorted. */
377 function outOf(name: string): string[] {
378 const from = [...cg!.getNodesByKind('function'), ...cg!.getNodesByKind('method')].find((n) => n.name === name);
379 expect(from, name).toBeDefined();
380 return cg!
381 .getOutgoingEdges(from!.id)
382 .filter((e) => e.kind === 'calls' || e.kind === 'references')
383 .map((e) => `${e.kind} ${cg!.getNode(e.target)!.qualifiedName}`)
384 .sort();
385 }
386
387 /** The functions `name` refers to as values. */
388 function values(name: string): string[] {

Callers 2

valuesFunction · 0.70

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected