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

Function sourceNames

__tests__/function-ref.test.ts:50–57  ·  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

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

Callers 1

Calls 1

getNodeMethod · 0.80

Tested by

no test coverage detected