Papa Parse handles commas in values and other edge cases.
(Baby Parse for Node has been deprecated - you can now use Papa Parse in the Browser and in Node.)
Eg. (node)
const csvParser = require('papaparse'); // previously you might have used babyparse
var arr = [1,null,"a,b"] ;
var csv = csvParser.unparse([arr]) ;
console.log(csv) ;
1,,"a,b"