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

Function reads

__tests__/java-value-reads.test.ts:62–67  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

60 let cg: CodeGraph;
61
62 const reads = (name: string): string[] => {
63 const from = cg.getNodesByKind('method').find((m: Node) => m.name === name);
64 expect(from, name).toBeDefined();
65 return cg.getOutgoingEdges(from!.id).filter((e) => e.kind === 'references').map((e) => cg.getNode(e.target)!)
66 .filter((n) => n.kind === 'constant').map((n) => n.qualifiedName).sort();
67 };
68
69 beforeAll(async () => {
70 dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-java-value-reads-'));

Callers 1

Calls 4

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

Tested by

no test coverage detected