• Parse CSV string to records.

    Type Parameters

    • Header extends readonly string[]

    Parameters

    Returns Promise<CSVRecord<Header>[]>

    Array of records

    Example

    import { parseString } from 'web-csv-toolbox';

    const csv = `name,age
    Alice,42
    Bob,69`;

    const records = await parseString.toArray(csv);
    console.log(records);
    // Prints:
    // [ { name: 'Alice', age: '42' }, { name: 'Bob', age: '69' } ]