Function
pickUniqueDuplicateKey
(originalKey: string, usedKeys: Set<string>)
Source from the content-addressed store, hash-verified
| 1117 | } |
| 1118 | |
| 1119 | function pickUniqueDuplicateKey(originalKey: string, usedKeys: Set<string>): string { |
| 1120 | let candidate = `${originalKey}-copy`; |
| 1121 | let suffix = 2; |
| 1122 | while (usedKeys.has(candidate)) { |
| 1123 | candidate = `${originalKey}-copy-${suffix}`; |
| 1124 | suffix++; |
| 1125 | } |
| 1126 | usedKeys.add(candidate); |
| 1127 | return candidate; |
| 1128 | } |
| 1129 | |
| 1130 | function deduplicateKey( |
| 1131 | jsxText: string, |
Tested by
no test coverage detected