node-csv
node-csv copied to clipboard
Export stream interface for browsers (esm)
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.
Were you able to figure out how to use the ESM version?
Have you tried to import csv-parse/stream' and not csv/stream` ? It shall work.
Forgot to update my comment but yeah, that worked for me.
Sorry for the late reply.
The csv-parse/stream import path did not work for me, because it pulls in node:stream/web which isn't available in a browser context.
However I'm no longer involved in the project that required this, so feel free to close
OK, thank you for the feedback. Let's leave the issue open for now as web stream need to be addressed properly at some point.