csv-stream-lite - v1.0.4
    Preparing search index...

    Interface CsvRowObjectOptions<T, I>

    Options for reading a CSV row as an object.

    The output type after optional transformation (defaults to T)

    interface CsvRowObjectOptions<T extends object, I = unknown> {
        headers: string[];
        includeExtraCells?: boolean;
        rowIndex?: number;
        shape?: CsvObjectShape<T>;
        strictColumns?: boolean;
        transform?: (row: I) => T;
    }

    Type Parameters

    • T extends object

      The object type with headers as keys

    • I = unknown
    Index

    Properties

    headers: string[]

    Headers for the CSV row

    includeExtraCells?: boolean

    Whether to include extra cells beyond defined headers. Defaults to false

    rowIndex?: number

    Optional row index for error messages

    shape?: CsvObjectShape<T>

    Shape definition mapping headers to type transformers, or an array of header names

    strictColumns?: boolean

    Whether to enforce exact column count matching headers. Defaults to false

    transform?: (row: I) => T

    Optional function to transform the parsed row object