• Public
  • Public/Protected
  • All

Interface IOptions

The options for a parser.


  • IOptions




columnOffsets: boolean

Whether to return column offsets in the offsets array.


If false, the returned offsets array contains just the row offsets. If true, the returned offsets array contains all column offsets for each column in the rows (i.e., it has nrows*ncols entries). Individual rows will have empty columns added or extra columns merged into the last column if they do not have exactly ncols columns.


data: string

The data to parse.

Optional delimiter

delimiter: string

The delimiter to use. Defaults to ','.

Optional maxRows

maxRows: number

Maximum number of rows to parse.

If this is not given, parsing proceeds to the end of the data.

Optional ncols

ncols: number

Number of columns in each row to parse.


If this is not given, the ncols defaults to the number of columns in the first row.

Optional quote

quote: string

The quote character for quoting fields. Defaults to the double quote (").


As specified in RFC 4180, quotes are escaped in a quoted field by doubling them (for example, "a""b" is the field a"b).

Optional rowDelimiter

rowDelimiter: string

The row delimiter to use. Defaults to '\r\n'.

Optional startIndex

startIndex: number

The starting index in the string for processing. Defaults to 0. This index should be the first character of a new row. This must be less than data.length.

Generated using TypeDoc