MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / dedupe

Function dedupe

graph-ui/src/provider/route-reader.ts:190–202  ·  view source on GitHub ↗

One registration reported once, even when two patterns both matched it.

(routes: SourceRoute[])

Source from the content-addressed store, hash-verified

188
189/** One registration reported once, even when two patterns both matched it. */
190function dedupe(routes: SourceRoute[]): SourceRoute[] {
191 const seen = new Set<string>();
192 const out: SourceRoute[] = [];
193 for (const route of routes) {
194 const key = `${route.method ?? ''} ${route.path} ${route.line}`;
195 if (seen.has(key)) {
196 continue;
197 }
198 seen.add(key);
199 out.push(route);
200 }
201 return out;
202}

Callers 1

readRoutesFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected