gkindel / csv-js

A Comma-Separated Values parser for JavaScript. Standards-based, stand alone, and no regular expressions.
http://gkindel.github.io/cxv-js/csv.html
106 stars 35 forks source link

Other delimiters #2

Closed LaurensRietveld closed 10 years ago

LaurensRietveld commented 11 years ago

Thanks a lot for your parser. I took a look at the code and am under the impression that changing the delimiter takes more than changing this one setting. Is this correct? It would be nice to specify the delimiter, so we could also use this for tsv's

gkindel commented 11 years ago

No, TSV is not currently supported. Unfortunately I don't expose the COMMA variable which is used internally. For now, you could try changing that in the source. I'll look into whether TSV would be something easily supportable with a switch (and what ramifications it may have on escape sequences, ignored whitespace).

gkindel commented 10 years ago

Not an easy reach, as it does affect escaping and whitespace handling. Closing for now.

gkindel commented 9 years ago

Take a look at the features added in https://github.com/gkindel/CSV-JS/issues/7 which added CSV.COLUMN_SEPARATOR as a configurable constant.