Don't wrap dates in single quotes
This commit is contained in:
parent
75f4b91cb9
commit
87c524bed1
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ exports.csv = function (headers, rows) {
|
||||||
.map(header => {
|
.map(header => {
|
||||||
let val = row[header]
|
let val = row[header]
|
||||||
val =
|
val =
|
||||||
typeof val === "object"
|
typeof val === "object" && !(val instanceof Date)
|
||||||
? `"${JSON.stringify(val).replace(/"/g, "'")}"`
|
? `"${JSON.stringify(val).replace(/"/g, "'")}"`
|
||||||
: `"${val}"`
|
: `"${val}"`
|
||||||
return val.trim()
|
return val.trim()
|
||||||
|
|
Loading…
Reference in a new issue