How to get the column headers?
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.3k
- Forks
- 299
- Avg merge
- 16h 19m
- Merged PRs (30d)
- 1
Description
Describe the bug
Version: 5.5.3
I am using the sync api to parse a csv file and get the records. I also need the headers (on the first line) for later analysis but they are not present in the records (maybe thats intentional). How do i get these?
To Reproduce
I am using the following code for parsing
const data = file.data;
const parseResult = parse(data, {
cast: true,
columns: true,
skip_empty_lines: true,
trim: true,
info: true,
delimiter
} as Options);
Contributor guide
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 with the sync API invocation shown in the issue and inspect how the parse result is shaped when columns, info, and cast are enabled. Determine whether the first-line headers are exposed by the current API or require a documented change, then verify the expected result with the parser's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100