Classes
A ParseError is returned for parsing errors. Line numbers are 1-indexed and columns are 0-indexed.
Functions
Csv parse helper to manipulate data. Provides an auto/custom mapper for columns.
Interfaces
Options for parse.
- columns: readonly string[]
List of names used for header definition.
- skipFirstRow: boolean
If you provide
skipFirstRow: trueandcolumns, the first line will be skipped. If you provideskipFirstRow: truebut notcolumns, the first line will be skipped and used as header definitions.
Options for parseRecord.
- comment: string
Character to start a comment.
- fieldsPerRecord: number
Enabling checking number of expected fields for each row.
- lazyQuotes: boolean
Allow unquoted quote in a quoted field or non-double-quoted quotes in quoted field.
- separator: string
Character which separates values.
- trimLeadingSpace: boolean
Flag to trim the leading space of the value.
Type Aliases
& { columns: readonly (infer C extends string)[]; }
& { columns?: undefined; skipFirstRow?: false | undefined; }
Options for parse and CsvParseStream.
Record type with column type.