danielgindi / node-csv-reader

A CSV stream reader, with many many features, and ability to work with the largest datasets
MIT License
35 stars 11 forks source link

Fix mistakes in #12 #13

Closed cinderblock closed 4 years ago

cinderblock commented 4 years ago

So, I made some mistakes with the first implementation. Not sure how it seemed to test fine. I must have been making some silly mistake.

Regardless, this fixes the API and adds support for how the asObject option changes the output.

I still think there might be some potential for an improved API that understands the string/boolean/object options and uses different types depending on the detected arguments.

PS. IMHO, adding types should trigger a minor version bump as I would call it a "new feature".

danielgindi commented 4 years ago

It just keeps getting better and better :-) One small thing - there's a new event "header" that's always emitted with the first row, always an array, only of strings (no type conversion of boolean/number). Do you think you could add that to the TS defs?