Possible to use CsvParseStream in Node.js
Hi, is it possible to use nodejs file streams with deno's stdlib?
5 Replies
as far as I can tell there's nothing in
@std/path
or @std/fs
that opens a file
I'm sure loading to a string is possible, but the file is fairly bigThere is no function to open a file in any of the
@std
packages, because that's already included in Deno itself, see https://docs.deno.com/examples/streaming_files/yeah sorry I'm trying to use the libraries from node.js with jsr's node compatibility
I'm still interested if it's possible but for now I'm using npm's
csv-parse
Right, in that case it's likely that you're running into the issue that Node by default uses NodeStreams (older API) and
@std
is written for WebStreams. In Node you can convert between the two, see https://nodejs.org/api/webstreams.html#nodejs-streams-interoperabilityoooh that looks like it, thank you!