• Parse CSV binary to array of records, ideal for smaller data sets.

    Type Parameters

    • Header extends readonly string[]

    Parameters

    Returns Promise<CSVRecord<Header>[]>

    Array of records

    Example: Parsing CSV binary

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

    const csv = Uint8Array.from([
    // ...
    ]);

    const stream = new ReadableStream({
    start(controller) {
    controller.enqueue(csv);
    controller.close();
    },
    });

    const records = await parseUint8ArrayStream.toArray(stream);
    console.log(records);

Generated using TypeDoc