Optionaloptions: OptionsStream of records
import { parseBinaryStream } from 'web-csv-toolbox';
const csv = Uint8Array.from([
// ...
]);
const stream = new ReadableStream({
start(controller) {
controller.enqueue(csv);
controller.close();
},
});
await parseBinaryStream.toStream(stream)
.pipeTo(new WritableStream({
write(record) {
console.log(record);
},
}),
);
Parse CSV binary to array of records.