mrodrig / json-2-csv

Convert JSON to CSV *or* CSV to JSON!
https://mrodrig.github.io/json-2-csv
MIT License
415 stars 57 forks source link

Documentation is wrong #75

Closed Thomathan closed 7 years ago

Thomathan commented 7 years ago

Docs say: json2csv uses trimHeaderFields csv2json uses trimHeaderValues Actual code uses trimHeaderFields

Also, the docs say there should be a trimFieldValues option but there's no reference to it in the code

mrodrig commented 7 years ago

Thanks for reporting that. Since I haven't worked on this code in a little bit, I looked into it and you're right - the documentation lists trimHeaderValues for csv2json when it should be trimHeaderFields

Looking through the code, I also realized that the trimFieldValues option value was not being copied over so the option was not working properly for json2csv or csv2json. I'll have the updated docs and code for trimFieldValues released in 2.1.1 shortly.

Thanks again!