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

Create default options object when none is provided

Open DavidVotrubec opened this issue 7 years ago • 0 comments

Method CSV.stringify() requires 2 arguments. Data and Options. I believe that Options should be optional, especially when supplying empty object is sufficient.

The second issue is that the options should have some reasonable default values, which could be optionally overrided. Fox example the options.txtDelim should have default value of '"'.

If options.txtDelim is not provided and data contain comma in the middle of some text property, then this comma is not automatically escaped and creates new column in generated CSV.

DavidVotrubec avatar Jun 19 '17 09:06 DavidVotrubec