MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / dedupe

Function dedupe

src/session/store.ts:13–18  ·  view source on GitHub ↗

De-dupe preserving order.

(xs: string[])

Source from the content-addressed store, hash-verified

11
12/** De-dupe preserving order. */
13function dedupe(xs: string[]): string[] {
14 const seen = new Set<string>();
15 const out: string[] = [];
16 for (const x of xs) { if (!seen.has(x)) { seen.add(x); out.push(x); } }
17 return out;
18}
19
20/**
21 * Turn free-text into a safe FTS5 MATCH expression: each token is double-quoted (neutralizing

Callers 2

buildFtsMatchFunction · 0.85
searchFactsMethod · 0.85

Calls 3

addMethod · 0.80
hasMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected