MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / sourceNames

Function sourceNames

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

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

Callers 1

Calls 1

getNodeMethod · 0.80

Tested by

no test coverage detected