The object type for each row when reading as objects
Creates a new CSV parser.
The object type for each row when reading as objects
OptionalasyncIterable: ByteBuffer | ByteStream<T>Optional byte stream or buffer containing CSV data
Optionaloptions: CsvEntityOptions & {Configuration options for CSV parsing
OptionalheadersOptionalnewlineOptionalshapeOptionaltransformConsumes the entity if it hasn't been consumed yet. This ensures the buffer advances to the end of this entity.
Asynchronously consumes the entity if it hasn't been consumed yet. This ensures the buffer advances to the end of this entity.
A promise that resolves when consumption is complete
ProtectedparseProtectedparseReads and parses the entire entity synchronously. Marks the entity as consumed after reading.
The parsed result of type T
Reads and parses the entire entity asynchronously. Marks the entity as consumed after reading.
A promise that resolves to the parsed result of type T
ProtectedstreamSynchronously streams CSV rows as objects. Reads headers from the first row if readHeaders is true.
A generator that yields parsed objects of type O
Asynchronously streams CSV rows as objects. Automatically handles buffer refills as needed.
An async generator that yields parsed objects of type O
StaticstringifierStaticstringifyStatic method to stringify an array of objects into CSV format. Returns a synchronous generator that yields CSV string chunks.
The input object type
The output object type after optional transformation (defaults to T)
A generator that yields CSV string chunks
StaticstringifyStatic method to stringify an array of objects into CSV format asynchronously. Returns an asynchronous generator that yields CSV string chunks.
The input object type
The output object type after optional transformation (defaults to T)
An async generator that yields CSV string chunks
Main CSV parser class for parsing complete CSV documents. Supports reading headers, streaming rows, and converting rows to objects.
Type Param: O
The output type after optional transformation (defaults to T)
Example