Interface ParseOptions<Header>

Parse options for CSV string.

interface ParseOptions<Header> {
    delimiter?: string;
    header?: Header;
    quotation?: string;
}

Type Parameters

  • Header extends ReadonlyArray<string>

Hierarchy (view full)

Properties

delimiter?: string

CSV field delimiter.

Remarks

If you want to parse TSV, specify '\t'.

This library supports multi-character delimiters.

Default

','
header?: Header

CSV header.

Remarks

If you specify this option, the first record will be treated as a normal record.

If you don't specify this option, the first record will be treated as a header.

Default

undefined
quotation?: string

CSV field quotation.

Remarks

This library supports multi-character quotations.

Default

'"'

Generated using TypeDoc