We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
csv-stringify/sync
Describe the bug
Even if used with header: true and columns options, csv-stringify/sync does not output headers when input is an empty array.
header: true
columns
The stream or callback API does.
To Reproduce
const { stringify } = require('csv-stringify/sync') stringify([], { header: true, columns: ['foo', 'bar']}) // ❌ returns '' // expected 'foo,bar' const { stringify } = require('csv-stringify') stringify([], { header: true, columns: ['foo', 'bar']}, (e, content) => console.log(content)) // ✅ logs 'foo,bar'
The text was updated successfully, but these errors were encountered:
16135c6
fix(csv-stringify): bom and header in sync mode with no records (fix #…
bff158f
…343)
No branches or pull requests
Describe the bug
Even if used with
header: true
andcolumns
options,csv-stringify/sync
does not output headers when input is an empty array.The stream or callback API does.
To Reproduce
The text was updated successfully, but these errors were encountered: