node-csvtojson
node-csvtojson copied to clipboard
Trim option does not work
Hi,
Thanks for your amazing work !
It seems that trim default value option does not work, even if I add it top options.
This is my test :
const csv = require('csvtojson');
const csvFilePath = 'src/contents/csv/projects.csv';
csv({ trim: true })
.fromFile(csvFilePath)
.then((jsonObj) => {
console.log(jsonObj);
});
And a part of the output :
...,
{
type_de_travaux: 'Démolir ',
stars_number: '4.5',
stars_vote: '0',
},
...,
Am I doing something wrong ?
I tried adding space at the beginning of a string and the result is the same.
same here