Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api to get only headers #485

Open
y-nk opened this issue Dec 26, 2023 · 1 comment
Open

api to get only headers #485

y-nk opened this issue Dec 26, 2023 · 1 comment

Comments

@y-nk
Copy link

y-nk commented Dec 26, 2023

I'm looking into some shortcut to get only headers as an array, so that i can validate them easily. I'm eagerly looking for position validation so includeHeaders as a regexp is not enough.

Any idea? preferably with using the async/await api, but can fallback to events if necessary.

@mebibou
Copy link

mebibou commented Aug 27, 2024

Have you tried this one from the README ?

const csv=require('csvtojson')
csv()
.on('header',(header)=>{
	//header=> [header1, header2, header3]
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants