Skip to main content
Module

std/csv/stream.ts>CsvStream

Deno standard library
Go to Latest
class CsvStream
implements TransformStream<string, RowType<T>>
import { CsvStream } from "https://deno.land/std@0.190.0/csv/stream.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.190.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
CsvStream(options?: T)

Type Parameters

optional
T extends CsvParseStreamOptions | undefined = undefined

Properties

readonly
readable
readonly
writable: WritableStream<string>