Lightweight CSV writer
npm install simple-csv-writersimple-csv-writer
=================
Converts a JavaScript array into a CSV string based on to the RFC 4180 standard.

writecsv function.
separator key (default is ,) and the default line separator using the newLine key (default is \r\n).
js
import writecsv from "simple-csv-writer";
const data = [
["1", "simple text"],
["2", "with \"quotes\""],
["3", "with separator, and \nnewline"]
];
writecsv(data);
`
`csv
1,simple text
2,"with ""quotes"""
3,"with separator, and
newline"
``