Function
dedupeHeader
(name: string, used: Set<string>, index: number)
Source from the content-addressed store, hash-verified
| 171 | } |
| 172 | |
| 173 | function dedupeHeader(name: string, used: Set<string>, index: number): string { |
| 174 | let base = name.trim() || `Column ${index + 1}` |
| 175 | let candidate = base |
| 176 | let n = 2 |
| 177 | while (used.has(candidate)) candidate = `${base} (${n++})` |
| 178 | used.add(candidate) |
| 179 | return candidate |
| 180 | } |
| 181 | |
| 182 | export interface InferredSchema { |
| 183 | idFieldId: string |
Tested by
no test coverage detected