MCPcopy Create free account
hub / github.com/Noumena-Network/code / dedupePaths

Function dedupePaths

src/utils/secureStorage/plainTextStorage.ts:13–24  ·  view source on GitHub ↗
(paths: string[])

Source from the content-addressed store, hash-verified

11import type { SecureStorage, SecureStorageData } from './types.js'
12
13function dedupePaths(paths: string[]): string[] {
14 const seen = new Set<string>()
15 const deduped: string[] = []
16 for (const path of paths) {
17 if (seen.has(path)) {
18 continue
19 }
20 seen.add(path)
21 deduped.push(path)
22 }
23 return deduped
24}
25
26function getStoragePath(): { storageDir: string; storagePath: string } {
27 const storageDir = getCanonicalNcodeConfigHomeDir()

Callers 1

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected