max-mapper / max-mapper/csv-write-stream
exception when headers passed to the csvWriter is empty array
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 203
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
if an empty array is added as headers
csvWriter({ headers: []})
I receive the following error
""return result + "\n"
Unexpected token 'return'
at csv-write-stream/index.js
(the compile function)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in csv-write-stream/index.js at the compile function and reproduce the issue with csvWriter({ headers: [] }). Inspect the generated result around the reported return result + "\n" error, then verify that passing an empty headers array no longer causes a syntax exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100