class CsvParseStream
implements TransformStream<string, RowType<T>>
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
Example 1
import { CsvParseStream } from "@std/csv/csv_parse_stream"; const res = await fetch("https://example.com/data.csv"); const parts = res.body! .pipeThrough(new TextDecoderStream()) .pipeThrough(new CsvParseStream());
Constructors
new CsvParseStream(options?: T)Construct a new instance.
Type Parameters
T extends CsvParseStreamOptions | undefined = undefinedProperties
readonly
readable: ReadableStream<RowType<T>>The instance's ReadableStream.
readonly
writable: WritableStream<string>The instance's WritableStream.