Closed vicradon closed 3 years ago
You pass only one header in options. This leads to the error.
@TrySound Must all available headers be passed?
csv-parser uses either provided headers or passed via options. Strict flag in both cases requires headers count to match columns in each row. From your example it looks like the first row is already a header so you can just remove headers
option.
Alright, thanks
Documentation Is:
Please Explain in Detail...
When strict is set to true and the headers supplied are less than the number of headers in the CSV, this error is thrown
For example, given this CSV
Supplying this data
throws the error.
Your Proposal for Changes
Some more documentation on what should be included when strict is set to true.