Auto parses a string as a number
kennethklee opened this issue · comments
Kenneth Lee commented
Describe the bug
csv-parse auto parses string that contains only numbers as a float when it shouldn't. I'm transforming a CSV and spitting out CSV.
To Reproduce
Input CSV file:
"Code","Name","Age"
"1234567890AB","Works",123
"123456789012","Doesn't",123
Output CSV file:
Code,Name,Age
1234567890AB,Works,123
1.23456E+11,Doesn't,123
Notice the output CSV transforms "123456789012"
into 1.23456E+11
Additional context
Add any other context about the problem here.
Worms David commented
I tried to reproduce but the behavior is as expected: https://github.com/adaltas/node-csv/blob/master/demo/issues-esm/lib/381.js
Kenneth Lee commented
you're right, sorry for wasting your time.
realized it was our transform stream -- didn't think we touched the code column, but I missed it