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

    Class FlexibleStringObjectCSVParser<Header>

    Flexible CSV Parser for string input with object output format. Combines StringCSVLexer and CSVRecordAssembler to return records as objects.

    This class implements StringObjectCSVParser interface and enforces object output format. For type-safe usage, use the createStringCSVParser() factory function.

    This is a low-level API that accepts CSVProcessingOptions (excluding execution strategy). For high-level APIs with execution strategy support, use parseString() and related functions.

    const parser = new FlexibleStringObjectCSVParser({
    header: ['name', 'age'] as const,
    delimiter: ',',
    signal: abortController.signal,
    // engine is NOT available (low-level API)
    });
    const records = parser.parse('Alice,30\nBob,25');
    for (const record of records) {
    console.log(record); // { name: 'Alice', age: '30' }
    }

    Type Parameters

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

      The type of the header row

    Hierarchy

    • BaseStringCSVParser<Header, "object">
      • FlexibleStringObjectCSVParser

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    assembler: any

    Methods