Created
April 11, 2019 23:40
-
-
Save isaacs/9f18bfd6355e237c9c22daab8973ed89 to your computer and use it in GitHub Desktop.
This file contains hidden or 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') | |
const parse = require('csv-parse') | |
const parserStream = parse({ | |
columns: true, | |
skip_empty_lines: true | |
}) | |
fs.createReadStream('file.csv') | |
.pipe(parserStream) | |
.on('data', record => console.log('record', record)) |
This file contains hidden or 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
key_1 | key_2 | |
---|---|---|
value 1 | value 2 | |
value again | another key2 value |
Author
isaacs
commented
Apr 11, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment