Function
recordDuplicateKeys
(keyToIdx: Map<unknown, Set<number>>, key: unknown, idx: number)
Source from the content-addressed store, hash-verified
| 73 | } |
| 74 | |
| 75 | function recordDuplicateKeys(keyToIdx: Map<unknown, Set<number>>, key: unknown, idx: number): void { |
| 76 | const idxSoFar = keyToIdx.get(key); |
| 77 | |
| 78 | if (idxSoFar !== undefined) { |
| 79 | idxSoFar.add(idx); |
| 80 | } else { |
| 81 | keyToIdx.set(key, new Set([idx])); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * The live collection reconciliation algorithm that perform various in-place operations, so it |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…