Skip to content

Instantly share code, notes, and snippets.

@4513ECHO
Created April 23, 2023 13:53
Show Gist options
  • Save 4513ECHO/512586c635a58b7954c89b82e618bb6c to your computer and use it in GitHub Desktop.
Save 4513ECHO/512586c635a58b7954c89b82e618bb6c to your computer and use it in GitHub Desktop.
import { CsvParseStream } from "https://deno.land/std@0.184.0/csv/csv_parse_stream.ts";
const file = await Deno.open("data.csv");
const stream = file.readable
.pipeThrough(new TextDecoderStream("shift-jis"))
.pipeThrough(new CsvParseStream());
for await (const record of stream) {
console.log(record);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment