MCPcopy Index your code
hub / github.com/github/copilot-sdk / dedupeGoJSONMatchTerms

Function dedupeGoJSONMatchTerms

scripts/codegen/go.ts:1374–1384  ·  view source on GitHub ↗
(terms: GoJSONMatchTerm[])

Source from the content-addressed store, hash-verified

1372}
1373
1374function dedupeGoJSONMatchTerms(terms: GoJSONMatchTerm[]): GoJSONMatchTerm[] {
1375 const seen = new Set<string>();
1376 const result: GoJSONMatchTerm[] = [];
1377 for (const term of terms) {
1378 const key = goJSONMatchTermKey(term);
1379 if (seen.has(key)) continue;
1380 seen.add(key);
1381 result.push(term);
1382 }
1383 return result;
1384}
1385
1386function compareGoJSONPaths(left: string[], right: string[]): number {
1387 return goJSONMatchPathKey(left).localeCompare(goJSONMatchPathKey(right));

Callers 1

Calls 3

goJSONMatchTermKeyFunction · 0.85
addMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…