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

Export stream interface for browsers (esm) #449

Open
thiemok opened this issue Dec 9, 2024 · 3 comments
Open

Export stream interface for browsers (esm) #449

thiemok opened this issue Dec 9, 2024 · 3 comments

Comments

@thiemok
Copy link

thiemok commented Dec 9, 2024

Summary

From what i can gather from #444 and the exported types in dist/esm/stream there is in theory a working implementation for web streams.
However there seems to be no /stream export for esm and parse imported from csv-parse/browser/esm does not return an object that would be usable as TranformStream.
Could you export the webstream variant for esm?

Motivation

I would like to be able use the same csv parsing library in both backend and frontend in order to minimize issues caused by differences in parsing behaviour.

@focux
Copy link

focux commented Jan 3, 2025

Were you able to figure out how to use the ESM version?

@wdavidw
Copy link
Member

wdavidw commented Jan 4, 2025

Have you tried to import csv-parse/stream' and not csv/stream` ? It shall work.

@focux
Copy link

focux commented Jan 4, 2025

Forgot to update my comment but yeah, that worked for me.

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

3 participants