Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/csv/mod.ts>CsvParseStream

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class CsvParseStream
implements TransformStream<string, RowType<T>>
import { CsvParseStream } from "https://deno.land/std@0.210.0/csv/mod.ts";

Read data from a CSV-encoded stream or file. Provides an auto/custom mapper for columns.

A CsvParseStream expects input conforming to RFC 4180.

Examples

Example 1

import { CsvParseStream } from "https://deno.land/std@0.210.0/csv/csv_parse_stream.ts";
const res = await fetch("https://example.com/data.csv");
const parts = res.body!
  .pipeThrough(new TextDecoderStream())
  .pipeThrough(new CsvParseStream());

Constructors

new
CsvParseStream(options?: T)

Type Parameters

optional
T extends CsvParseStreamOptions | undefined = undefined

Properties

readonly
readable: ReadableStream<RowType<T>>
readonly
writable: WritableStream<string>