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

Function sourceNames

__tests__/function-ref.test.ts:51–58  ·  view source on GitHub ↗

Names of the source nodes of the given edges, sorted.

(cg: CodeGraph, edges: Edge[])

Source from the content-addressed store, hash-verified

49
50/** Names of the source nodes of the given edges, sorted. */
51function sourceNames(cg: CodeGraph, edges: Edge[]): string[] {
52 const names: string[] = [];
53 for (const e of edges) {
54 const n = cg.getNode(e.source);
55 if (n) names.push(n.name);
56 }
57 return names.sort();
58}
59
60describe('Function-as-value capture (#756)', () => {
61 let tmpDir: string | undefined;

Callers 1

Calls 2

getNodeMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected