Stream of records
import { parseBlob } from 'web-csv-toolbox';
const blob = new Blob(['name,age\nAlice,42\nBob,69'], { type: 'text/csv' });
await parseBlob.toStream(blob)
.pipeTo(
new WritableStream({
write(record) {
console.log(record);
},
}),
);
// Prints:
// { name: 'Alice', age: '42' }
// { name: 'Bob', age: '69' }
Parse CSV from a Blob or File to stream of records.