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

Function add

ui/src/lib/filecode-model.ts:219–223  ·  view source on GitHub ↗
(line: number, ref: LineRef)

Source from the content-addressed store, hash-verified

217export function buildFileRefs(payload: WireFileCodePayload): Map<number, LineRef[]> {
218 const byLine = new Map<number, LineRef[]>();
219 const add = (line: number, ref: LineRef): void => {
220 const bucket = byLine.get(line);
221 if (bucket) bucket.push(ref);
222 else byLine.set(line, [ref]);
223 };
224
225 for (const call of payload.calls.items) {
226 const relation = call.relation;

Callers 1

buildFileRefsFunction · 0.70

Calls 3

pushMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected