CsvParseStreamOptions
import { CsvParseStreamOptions } from "jsr:@ende/csv";interface
interface CsvParseStreamOptionsOptions for CsvParseStream.
Properties
separator
separator?: stringCharacter which separates values.
Default: ","
comment
comment?: stringCharacter to start a comment.
Lines beginning with the comment character without preceding whitespace
are ignored. With leading whitespace the comment character becomes part of
the field, even you provide trimLeadingSpace: true.
By default, no character is considered to be a start of a comment.
trimLeadingSpace
trimLeadingSpace?: booleanFlag to trim the leading space of the value.
This is done even if the field delimiter, separator, is white space.
Default: false
lazyQuotes
lazyQuotes?: booleanAllow unquoted quote in a quoted field or non-double-quoted quotes in quoted field.
Default: false
fieldsPerRecord
fieldsPerRecord?: numberEnabling checking number of expected fields for each row.
If positive, each record is required to have the given number of fields. If 0, it will be set to the number of fields in the first row, so that future rows must have the same field count. If negative, no check is made and records may have a variable number of fields.
If the wrong number of fields is in a row, a SyntaxError
is thrown.
skipFirstRow
skipFirstRow?: booleanIf you provide skipFirstRow: true and columns, the first line will be
skipped.
If you provide skipFirstRow: true but not columns, the first line will
be skipped and used as header definitions.
Default: false
columns
columns?: readonly string[]List of names used for header definition.