Skip to content

Instantly share code, notes, and snippets.

@mishawagon
Created January 22, 2019 18:26
Show Gist options
  • Save mishawagon/6ff68b94c87c8e3fddd703c92a92e4af to your computer and use it in GitHub Desktop.
Save mishawagon/6ff68b94c87c8e3fddd703c92a92e4af to your computer and use it in GitHub Desktop.
csv-praser test
'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