MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / findDuplicates

Function findDuplicates

frontend/scripts/check-assets.ts:87–100  ·  view source on GitHub ↗
(items: T[])

Source from the content-addressed store, hash-verified

85}
86
87function findDuplicates<T>(items: T[]): T[] {
88 const seen = new Set<T>();
89 const duplicates = new Set<T>();
90
91 for (const item of items) {
92 if (seen.has(item)) {
93 duplicates.add(item);
94 } else {
95 seen.add(item);
96 }
97 }
98
99 return Array.from(duplicates);
100}
101
102async function validateChallenges(): Promise<void> {
103 const problems = new Problems<"_list.json", never>("Challenges", {});

Callers 2

validateQuotesFunction · 0.85
validateLanguagesFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected