CSV string to parse
Optional
options: ParseOptions<Header>Parsing options. See ParseOptions.
Async iterable iterator of records.
If you want array of records, use parseString.toArray function.
import { parseString } from 'web-csv-toolbox';
const csv = `name,age
Alice,42
Bob,69`;
for await (const record of parseString(csv)) {
console.log(record);
}
// Prints:
// { name: 'Alice', age: '42' }
// { name: 'Bob', age: '69' }
Parse CSV string to records.