Skip to content

Instantly share code, notes, and snippets.

View artyomliou's full-sized avatar
🇺🇦

Artyom Liou artyomliou

🇺🇦
View GitHub Profile
const fs = require('fs');
const { parse } = require('csv-parse');
async function* readCsvFile(filepath) {
const parser = fs.createReadStream(filepath).pipe(
parse({
columns: true,
skipEmptyLines: true,
trim: true
})