@ztimson/utils 0.23.18 → 0.23.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -740,7 +740,7 @@ function toCsv(target, flatten = true) {
|
|
|
740
740
|
const value2 = dotNotation(row, h);
|
|
741
741
|
if (value2 == null) return "";
|
|
742
742
|
if (typeof value2 == "object") return `"${JSONSanitize(value2).replaceAll('"', '""')}"`;
|
|
743
|
-
if (typeof value2 == "string" && /[\n"]/g.test(value2)) return `"${value2.replaceAll('"', '""')}"`;
|
|
743
|
+
if (typeof value2 == "string" && /[\n",]/g.test(value2)) return `"${value2.replaceAll('"', '""')}"`;
|
|
744
744
|
return value2;
|
|
745
745
|
}).join(","))
|
|
746
746
|
].join("\n");
|