Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignoreEmpty: true and checkType: true does not work if set output is csv format #466

Open
hacker0limbo opened this issue Jan 29, 2023 · 2 comments

Comments

@hacker0limbo
Copy link

Following config is not working properly when setting the output to csv

const csvtojson = require('csvtojson');
csvtojson({
  noheader: true,
  output: 'csv',
  ignoreEmpty: true,
  checkType: true,
})
  .fromFile(xxx)
  .then((rowData) => {
    // rowData still contains empty value(empty string) and all data is string format
    // however if switched to json output everything works fine
  })
@manoger
Copy link

manoger commented May 4, 2023

I'm facing the same behaviour, I have thousands of lines like ;;;; and they are being parsed

@hacker0limbo
Copy link
Author

I'm facing the same behaviour, I have thousands of lines like ;;;; and they are being parsed

Just use other lib instead. I doubt they won't check and fix issue frequently...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants