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

support headers as comment #419

Open
bluelovers opened this issue Feb 10, 2024 · 3 comments
Open

support headers as comment #419

bluelovers opened this issue Feb 10, 2024 · 3 comments

Comments

@bluelovers
Copy link

Summary

A clear and concise description of what the feature is.

Motivation

If the feature is related to a problem, describe it. Add any other context explaining why this feature is of interest to you and the community.

Alternative

A clear and concise description of alternative solutions or features you've considered.

Draft

something like this

if (options?.headers_as_comment)
	{
		const headers = columns.slice();
		// @ts-ignore
		headers[0] = options.comment + ' ' + headers[0];

		list = [
			headers,
			...list,
		]
	}

	return stringify(list, {
		delimiter,
	})

Additional context

# domain	path	name	value	expires
xxx.cc	/	connect.sid	xxx	Mon, 03-Feb-2025 19:32:17 GMT
xxx.cc	/	connect.sid	xxx	Mon, 03-Feb-2025 19:32:17 GMT
xxx.cc	/	connect.sid2	xxx	Wed, 14-Jun-2017 07:00:00 GMT
xxx.cc	/	connect.sid3	xxx	Wed, 31-Dec-1969 23:59:59 GMT
xxx.cc	/	connect.sid	xxx	Mon, 03-Feb-2025 19:32:17 GMT
xxx.cc	/	connect.sid	xxx	Mon, 03-Feb-2025 19:32:17 GMT
xxx.cc	/	connect.sid	xxx	Mon, 03-Feb-2025 19:32:17 GMT
xxx.cc	/	connect.sid	xxx	Mon, 03-Feb-2025 19:32:17 GMT

Add any other context or screenshots about the feature request here.

@wdavidw
Copy link
Member

wdavidw commented Feb 10, 2024

Good idea, let me know if you are thinking to submit a merge request.

@bluelovers
Copy link
Author

i don't know how to make a good pr

@wdavidw
Copy link
Member

wdavidw commented Feb 11, 2024

I can do it. If you wish to give it a try, there are a lot of tutorials on how to fork this repo and propose some changes. I'll mentor you if necessary (in such case, give me access to your fork).

bluelovers added a commit to bluelovers/node-csv that referenced this issue Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants