Interface NdjsonToCsvStreamOptions

interface NdjsonToCsvStreamOptions {
    delimiter?: string;
    includeHeaders?: boolean;
    renameMap?: Record<string, string>;
    maxRecords?: number;
    preventCsvInjection?: boolean;
    rfc4180Compliant?: boolean;
    schema?: Record<string, any>;
    transform?: (row: Record<string, any>) => Record<string, any>;
    addBOM?: boolean;
}

Properties

delimiter?: string

Delimiter for CSV output (default: ',')

includeHeaders?: boolean

Include headers row (default: true)

renameMap?: Record<string, string>

Rename column headers { oldKey: newKey }

maxRecords?: number

Maximum number of records to process

preventCsvInjection?: boolean

Prevent CSV injection attacks by escaping formulas (default: true)

rfc4180Compliant?: boolean

Ensure RFC 4180 compliance (proper quoting, line endings) (default: true)

schema?: Record<string, any>

JSON schema for validation and formatting

transform?: (row: Record<string, any>) => Record<string, any>

Custom transform function for each row

addBOM?: boolean

Add UTF-8 BOM for Excel compatibility (default: true)