(mappings: ColumnMapping[])
| 14 | import { allowUserToMapColumn } from '.'; |
| 15 | |
| 16 | function removeMappingDuplicates(mappings: ColumnMapping[]): ColumnMapping[] { |
| 17 | const uniqueMap = new Map<string, ColumnMapping>(); |
| 18 | |
| 19 | mappings.forEach((entry) => { |
| 20 | if (!uniqueMap.has(entry.csvColumnName)) { |
| 21 | uniqueMap.set(entry.csvColumnName, entry); |
| 22 | } |
| 23 | }); |
| 24 | |
| 25 | return Array.from(uniqueMap.values()); |
| 26 | } |
| 27 | |
| 28 | function buildSheetSuggestedHeaderMappings( |
| 29 | sheet: SheetDefinition, |
no outgoing calls
no test coverage detected