If the input file is encoded with BOM then the first cell is not correctly parsed and it causes undefined value later on.
Specifically, the parsed column name is not correct and thus trying to refer to it by name on the row objects returns undefined values where the key is apparently missing.
The solution seems to be to use bom: true option on the csv-parse. For some reason it is false byt default although I don't think it can have any adverse effects.
I propose to set it to true by default in, maybe allowing to change back to false if necessary.
If the input file is encoded with BOM then the first cell is not correctly parsed and it causes
undefined
value later on.Specifically, the parsed column name is not correct and thus trying to refer to it by name on the row objects returns
undefined
values where the key is apparently missing.The solution seems to be to use
bom: true
option on thecsv-parse
. For some reason it is false byt default although I don't think it can have any adverse effects.I propose to set it to
true
by default in, maybe allowing to change back tofalse
if necessary.