[FEATURE] Add check for empty rows in csv
Parsing or Formatting?
- [ x ] Parsing
Is your feature request related to a problem? Please describe.
Right now, i have an issue with completely empty rows being read by fast-csv when i make a csv from an existing excel sheet.
An empty row being read means i have to manually check for the entries in the row and not use it if it's empty.
Describe the solution you'd like
Ideally, i would expect the fast-csv parser to recognize that the row is completely empty and not return the same to the result.
Describe alternatives you've considered
Right now, i work around this by parsing the object.entries property to check if row is empty and drop that in case if its empty.
Additional context In case this feels like an useful feature to include in the library, I'd be happy to raise a PR to fix this issue.
@dopecodez does the ignoreEmpty option not work for you? You can see an example here
@doug-martin When i try this on version 4.3.6, the on data event is fired for empty rows. my config is
{ delimiter: ',', ignoreEmpty: true, headers: true, }