MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / dedupeWindowsPaths

Function dedupeWindowsPaths

packages/kaos/src/environment.ts:218–228  ·  view source on GitHub ↗
(paths: readonly string[])

Source from the content-addressed store, hash-verified

216}
217
218function dedupeWindowsPaths(paths: readonly string[]): readonly string[] {
219 const deduped: string[] = [];
220 const seen = new Set<string>();
221 for (const path of paths) {
222 const key = normalizeWindowsPath(path).toLowerCase();
223 if (seen.has(key)) continue;
224 seen.add(key);
225 deduped.push(path);
226 }
227 return deduped;
228}
229
230/**
231 * Production convenience — derive the deps bag from Node's ambient surface.

Callers 1

findExecutablesOnPathFunction · 0.85

Calls 4

normalizeWindowsPathFunction · 0.85
hasMethod · 0.65
addMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected