Skip to content

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

Open

Description

@hacker0limbo

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
  })

Activity

  1. manoger commented on May 4, 2023

    @manoger

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

  2. hacker0limbo commented on May 5, 2023

    @hacker0limbo
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions