The object type when reading as an object
Creates a new CSV entity.
The object type when reading as an object
OptionalasyncIterable: ByteBuffer | ByteStreamOptional byte stream or buffer to parse
Optionaloptions: CsvEntityOptionsConfiguration options for parsing
OptionalnewlineMakes this entity async iterable using the asynchronous stream.
An async generator that yields values of type S
Makes this entity iterable using the synchronous stream.
A generator that yields values of type S
Consumes 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
Reads the row as an object using the provided shape definition. Handles column count validation and extra cells based on options.
Configuration for reading the row as an object
The parsed object of type O
Asynchronously reads the row as an object using the provided shape definition. Automatically handles buffer refills as needed.
Configuration for reading the row as an object
A promise that resolves to the parsed object of type O
Returns a synchronous generator that yields chunks of type S. Marks the entity as consumed when iteration completes.
A generator that yields values of type S
Returns an asynchronous generator that yields chunks of type S. Handles buffering and automatically reads more data as needed.
An async generator that yields values of type S
Protectedstream
Represents a single CSV row that can be read as an array of strings or streamed as individual cells. Can also be parsed into an object using a shape definition.
Type Param: O
The output type after optional transformation (defaults to T)