web-csv-toolbox
    Preparing search index...

    Function toIterableIterator

    • Parse CSV string to records.

      Type Parameters

      • Header extends readonly string[]

      Parameters

      Returns IterableIterator<CSVRecord<Header>>

      Async iterable iterator of records

      import { parseString } from 'web-csv-toolbox';

      const csv = `name,age
      Alice,42
      Bob,69`;

      for (const record of parseString.toIterableIterator(csv)) {
      console.log(record);
      }
      // Prints:
      // { name: 'Alice', age: '42' }
      // { name: 'Bob', age: '69' }