I\'m trying to produce a Google Shopping feed of 30,000+ items in NetSuite, a CRM system that runs server-side JavaScript that it calls Suitescript 2.0. Essentially, it\'s j
In my case, I didn't want to quote strings that did not need quoting. So I test the string for nasty characters before quoting it.
function escapeCSV (term) { if (term.match && term.match(/,|"/)) { return `"${term.replace('"','""')}"` } else { return term } }