Minimal CSV parser implemented using web TransformStream
$ npm install --save @pirxpilot/csv-parse
const res = await fetch('http://example.com/cities.csv');
const stream = res.body
.pipeThrough(new TextDecoderStream())
.pipeThrough(new CsvLineStream({ trim: true }));
for await (const line of stream) {
console.log('Line: %s', line);
}
MIT © Damian Krzeminski