Skip to content

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

@hacker0limbo

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

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