Optional
options: ParseBinaryOptions<Header>Stream of records
import { parseUint8ArrayStream } from 'web-csv-toolbox';
const csv = Uint8Array.from([
// ...
]);
const stream = new ReadableStream({
start(controller) {
controller.enqueue(csv);
controller.close();
},
});
await parseUint8ArrayStream.toStream(stream)
.pipeTo(new WritableStream({
write(record) {
console.log(record);
},
}),
);
Parse CSV binary to array of records.