Skip to content

parseCsv

parseCsv(text, options?): string[][]

Defined in: packages/format-csv/src/parse-csv.ts:16

Parses RFC 4180 CSV text into rows of raw string fields.

A utility over CsvRowDecoder, not a second implementation of the grammar. Lenient on line endings: accepts \r\n or bare \n regardless of options.newline, which only controls what stringifyCsv produces. options.header has no effect here — the return type carries no header/body distinction, so a caller that used header: true slices off result[0] itself.

string

CsvOptions

string[][]