MCPcopy Index your code
hub / github.com/continuedev/continue / deduplicateArray

Function deduplicateArray

core/util/index.ts:122–135  ·  view source on GitHub ↗
(
  array: T[],
  equal: (a: T, b: T) => boolean,
)

Source from the content-addressed store, hash-verified

120}
121
122export function deduplicateArray<T>(
123 array: T[],
124 equal: (a: T, b: T) => boolean,
125): T[] {
126 const result: T[] = [];
127
128 for (const item of array) {
129 if (!result.some((existingItem) => equal(existingItem, item))) {
130 result.push(item);
131 }
132 }
133
134 return result;
135}
136
137export type TODO = any;
138

Callers 8

loadJsonMcpConfigsFunction · 0.90
deduplicateChunksFunction · 0.90
migrateJsonSharedConfigFunction · 0.90
refreshOpenFilesFunction · 0.90
expandSnippetFunction · 0.90
FileSearchClass · 0.90
index.test.tsFile · 0.85

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected