Created
January 22, 2019 18:26
-
-
Save mishawagon/6ff68b94c87c8e3fddd703c92a92e4af to your computer and use it in GitHub Desktop.
csv-praser test
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
'use strict'; | |
const csv = require('csv-parser'); | |
const fs = require('fs'); | |
const results = []; | |
csv({ separator: '\t' }); | |
fs.createReadStream('usgs_small.txt') | |
.pipe(csv({ separator: '\t' })) | |
.on('data', (d) => { results.push(d)}) | |
.on('end', ()=> { | |
console.log(results); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment