web-csv-toolbox - v0.14.0
    Preparing search index...

    Interface BinaryArrayCSVParser<Header>

    Binary CSV Parser interface for array output format.

    BinaryArrayCSVParser parses binary CSV data and returns records as arrays. Each record is returned as a tuple/array with values in header order.

    This interface is designed to be easily implemented in Rust/WASM with clear type semantics.

    const parser: BinaryArrayCSVParser<['name', 'age']> = ...;
    const data = new TextEncoder().encode('Alice,30\nBob,25');
    for (const record of parser.parse(data)) {
    console.log(record); // ['Alice', '30'] - typed as named tuple
    }
    interface BinaryArrayCSVParser<
        Header extends ReadonlyArray<string> = readonly string[],
    > {
        parse(
            chunk?: BufferSource,
            options?: CSVParserParseOptions,
        ): IterableIterator<CSVArrayRecord<Header, "keep">>;
    }

    Type Parameters

    • Header extends ReadonlyArray<string> = readonly string[]

      Array of header field names

    Implemented by

    Index

    Methods

    Methods

    • Parse a chunk of CSV binary data into array records.

      Parameters

      • Optionalchunk: BufferSource

        CSV binary chunk (BufferSource: Uint8Array, ArrayBuffer, or other TypedArray) to parse (optional for flush)

      • Optionaloptions: CSVParserParseOptions

        Parse options

      Returns IterableIterator<CSVArrayRecord<Header, "keep">>

      Iterable iterator of parsed CSV records as arrays/tuples