• Preparing search index...
  • The search index is not available
web-csv-toolbox
  • web-csv-toolbox
  • parseBinary
  • toStream

Function toStream

  • toStream<Header>(bytes, options?): ReadableStream<CSVRecord<Header>>
  • Parse a binary from an Uint8Array to a stream of records.

    Type Parameters

    • Header extends readonly string[]

    Parameters

    • bytes: Uint8Array

      CSV bytes to parse.

    • Optional options: ParseBinaryOptions<Header>

      Parsing options

    Returns ReadableStream<CSVRecord<Header>>

    Stream of records.

    Example

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

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

    const stream = parseUint8Array.toStream(csv);

    await stream.pipeTo(
    new WritableStream({
    write(record) {
    console.log(record);
    },
    }),
    );
    • Defined in src/parseBinary.ts:136

Settings

Member Visibility

Theme

web-csv-toolbox
  • Loading...

Generated using TypeDoc