parse-csv
parse-csv copied to clipboard
Custom delimiter
Hi Jon,
This PR allows user to set custom delimiter, 'tab' value is still available.
My MS Excel (15.33 for Mac) exports csv files with ';' as a delimiter by default, but 'delimiter' of the Parse option has strange behaviour: 'toArray' function ignores 'opts.delimiter' parameter and tries to read 'opts.delim', 'delimiter' variable in Parser.prototype.parse is not used at all.
Also default value for 'opts.delimiter' parameter for the Parser class was changed to ',' to save backward compatibility - see tests.
With best regards, Alexander.