Skip to content

Instantly share code, notes, and snippets.

@ali-kamalizade
Created March 15, 2020 21:20
Show Gist options
  • Save ali-kamalizade/d19f0a0a506a97e388a5c7d481086473 to your computer and use it in GitHub Desktop.
Save ali-kamalizade/d19f0a0a506a97e388a5c7d481086473 to your computer and use it in GitHub Desktop.
Importing a
const fs = require('fs');
function readCsvFile(csvFilePath) {
const csvFileContent = (await fs.readFile(csvFilePath)).toString();
return parse(csvFileContent, {skipEmptyLines: true, header: true});
}
readCsvFile('some-path');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment