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

    Interface MainThreadEngineConfig

    Engine configuration for main thread execution.

    interface MainThreadEngineConfig {
        arrayBufferThreshold?: number;
        backpressureCheckInterval?: BackpressureCheckInterval;
        queuingStrategy?: QueuingStrategyConfig;
        wasm?: boolean;
        worker?: false;
    }

    Hierarchy

    • BaseEngineConfig
      • MainThreadEngineConfig
    Index

    Properties

    arrayBufferThreshold?: number

    Blob reading strategy threshold (in bytes). Only applicable for parseBlob() and parseFile().

    Determines when to use blob.arrayBuffer() vs blob.stream():

    • Files smaller than threshold: Use blob.arrayBuffer() + parseBinary()
      • ✅ Faster for small files
      • ❌ Loads entire file into memory
    • Files equal to or larger than threshold: Use blob.stream() + parseBinaryStream()
      • ✅ Memory-efficient for large files
      • ❌ Slight streaming overhead
    1_048_576 (1MB)
    
    backpressureCheckInterval?: BackpressureCheckInterval

    Backpressure monitoring intervals (count-based: number of tokens/records processed).

    { lexer: 100, assembler: 10 }
    @experimental
    queuingStrategy?: QueuingStrategyConfig

    Internal streaming queuing strategies.

    wasm?: boolean

    Use WASM implementation.

    WASM module is automatically initialized on first use. However, it is recommended to call loadWASM beforehand for better performance.

    false
    
    import { loadWASM, parse } from 'web-csv-toolbox';

    await loadWASM();
    parse(csv, { engine: { wasm: true } })
    import { loadWASM, parse } from 'web-csv-toolbox';

    await loadWASM();
    parse(csv, { engine: { worker: true, wasm: true } })
    worker?: false

    Execute in Worker thread.

    false