Optional
options: ParseOptions<Header>Array of records
import { parseStringStream } from 'web-csv-toolbox';
const csv = `name,age
Alice,42
Bob,69`;
const stream = new ReadableStream({
start(controller) {
controller.enqueue(csv);
controller.close();
},
});
await parseStringStream.toStream(stream)
.pipeTo(
new WritableStream({
write(record) {
console.log(record);
},
}),
);
Parse CSV string stream to records.