parse-csv icon indicating copy to clipboard operation
parse-csv copied to clipboard

Custom delimiter

Open aleksfes opened this issue 7 years ago • 0 comments

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.

aleksfes avatar Jan 30 '18 11:01 aleksfes