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

Cant add txtDelim when the seprator is not equals to (,) without setting quoteStrings to true

Open agoubar opened this issue 6 years ago • 0 comments

    if (options.quoteStrings || data.indexOf(',') > -1 || data.indexOf('\n') > -1 || data.indexOf('\r') > -1) {
        data = options.txtDelim + data + options.txtDelim;
    }

must be replaced by if (options.quoteStrings || data.indexOf(options.fieldSep ? options.fieldSep : ",") > -1 || data.indexOf('\n') > -1 || data.indexOf('\r') > -1) { data = options.txtDelim + data + options.txtDelim; }

agoubar avatar Feb 15 '19 13:02 agoubar