Skip to content

Instantly share code, notes, and snippets.

@amir734jj
Created April 4, 2019 14:09
Show Gist options
  • Save amir734jj/d9194c321599a5ec5ad9737e394d2038 to your computer and use it in GitHub Desktop.
Save amir734jj/d9194c321599a5ec5ad9737e394d2038 to your computer and use it in GitHub Desktop.
Add quotes to CSV
"A,B\na,b".split(/\r?\n/).map(x => x.split(',').map(x => `"${x}"`).join(',')).join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment