MCPcopy Create free account
hub / github.com/anomalyco/opencode / assertUniqueKeys

Function assertUniqueKeys

packages/core/src/system-context/index.ts:314–320  ·  view source on GitHub ↗
(sources: ReadonlyArray<PackedSource>)

Source from the content-addressed store, hash-verified

312}
313
314function assertUniqueKeys(sources: ReadonlyArray<PackedSource>) {
315 const keys = new Set<Key>()
316 for (const source of sources) {
317 if (keys.has(source.key)) throw new DuplicateKeyError({ key: source.key })
318 keys.add(source.key)
319 }
320}

Callers 1

combineFunction · 0.85

Calls 1

addMethod · 0.65

Tested by

no test coverage detected