MCPcopy Create free account
hub / github.com/HelloCSV/HelloCSV / buildSuggestedHeaderMappings

Function buildSuggestedHeaderMappings

src/mapper/utils.ts:64–76  ·  view source on GitHub ↗
(
  sheetDefinitions: SheetDefinition[],
  csvHeaders: string[]
)

Source from the content-addressed store, hash-verified

62}
63
64export const buildSuggestedHeaderMappings = (
65 sheetDefinitions: SheetDefinition[],
66 csvHeaders: string[]
67) => {
68 const headerMappings: ColumnMapping[] = [];
69
70 sheetDefinitions.forEach((sheet) => {
71 const mappings = buildSheetSuggestedHeaderMappings(sheet, csvHeaders);
72 headerMappings.push(...mappings);
73 });
74
75 return removeMappingDuplicates(headerMappings);
76};
77
78export function calculateNewMappingsForCsvColumnMapingChanged(
79 currentMapping: ColumnMapping[],

Callers 2

uploadFileMethod · 0.90
index.test.jsFile · 0.90

Calls 3

removeMappingDuplicatesFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected