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

Function canonRef

scripts/kernel-parity.mjs:152–163  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

150}
151
152function canonRef(r) {
153 // FULL object — a field only one path sets is a parity bug (the vitest
154 // parity suite caught decode.ts pre-filling filePath/language this way).
155 const out = {
156 from: r.fromNodeId, name: r.referenceName, kind: r.referenceKind,
157 line: r.line, column: r.column,
158 };
159 for (const k of ['filePath', 'language', 'candidates', 'rowId']) {
160 if (r[k] !== undefined) out[k] = r[k];
161 }
162 return JSON.stringify(out);
163}
164
165function diffSets(aList, bList) {
166 const a = new Map(); // canon -> count (multiset — duplicates matter)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected