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

    Class CsvRow<T, I>

    Represents a single CSV row that can be read as an array of strings or streamed as individual cells. Can also be parsed into an object using a shape definition.

    The output type after optional transformation (defaults to T)

    Type Parameters

    • T extends object = object

      The object type when reading as an object

    • I = unknown

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    byteBuffer: ByteBuffer
    consumed: boolean = false
    escapeChar: string = '"'
    newline?: string
    quoteChar: string = '"'
    separator: string = ','
    trim: boolean = false

    Accessors

    Methods

    • Asynchronously consumes the entity if it hasn't been consumed yet. This ensures the buffer advances to the end of this entity.

      Returns Promise<void>

      A promise that resolves when consumption is complete

    • Reads the row as an object using the provided shape definition. Handles column count validation and extra cells based on options.

      Parameters

      Returns T

      The parsed object of type O

      If strictColumns is true and extra cells are found

      If strictColumns is true and cells are missing