Don't cast by default. It unnecessarily slows down the parser when the input is purely string data.
Don't hesitate to look at how other CSV libraries work. They've likely solved most/all of the issues you're currently having.
Do add the ability to cast scalar values (ex ints, floats).
Do verify RFC compliance using tests.
Do use vanilla Javascript. Niceties like Coffeescript are good for one-off webapps but add unnecessary dependencies/problems if you're targeting a larger audience.
Do have a solid plan for versioning. Only add backwards-incompatible changes to major versions (ie 1.0, 2.0).
Do have your users try the code in different browsers/platforms. Differences in Regex implementations can cause problems and using streams in Node will be completely different than handling them in the browser.
You win the million dollar prize if you can manage to figure out how to write a CSV stream reader that works in the browser.
Don't hesitate to look at how other CSV libraries work. They've likely solved most/all of the issues you're currently having.
Do add the ability to cast scalar values (ex ints, floats).
Do verify RFC compliance using tests.
Do use vanilla Javascript. Niceties like Coffeescript are good for one-off webapps but add unnecessary dependencies/problems if you're targeting a larger audience.
Do have a solid plan for versioning. Only add backwards-incompatible changes to major versions (ie 1.0, 2.0).
Do have your users try the code in different browsers/platforms. Differences in Regex implementations can cause problems and using streams in Node will be completely different than handling them in the browser.
You win the million dollar prize if you can manage to figure out how to write a CSV stream reader that works in the browser.