Created
March 15, 2020 21:20
-
-
Save ali-kamalizade/d19f0a0a506a97e388a5c7d481086473 to your computer and use it in GitHub Desktop.
Importing a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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