Created
May 28, 2015 21:41
-
-
Save gabhi/e62ba2ca7959bd2c4f91 to your computer and use it in GitHub Desktop.
node js csv
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
var fs = require('fs'); | |
var csv = require("fast-csv"); | |
var stream = fs.createReadStream("data.csv"); | |
var csvStream = csv() | |
.on("data", function(data){ | |
console.log(data); | |
}) | |
.on("end", function(){ | |
console.log("done"); | |
}); | |
stream.pipe(csvStream); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment