We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ead7b16 commit dee8411Copy full SHA for dee8411
src/modules/CSVFileModule.js
@@ -10,12 +10,15 @@ class CSVFileModule {
10
// Parse then normalize the data
11
const parsedData = parse(fs.readFileSync(csvFilePath), {
12
columns: (header) => header.map((column) => stringNormalizer(column)),
13
+ // https://csv.js.org/parse/options/bom/
14
bom: true,
15
+ // https://csv.js.org/parse/options/skip_empty_lines/
16
skip_empty_lines: true,
17
+ // NOTE: This will skip any records with empty values, not just skip the empty values themselves
18
+ // https://csv.js.org/parse/options/skip_records_with_empty_values/
19
skip_records_with_empty_values: true,
20
});
21
this.filePath = csvFilePath;
-
22
this.data = normalizeEmptyValues(parsedData, unalterableColumns);
23
}
24
0 commit comments