Skip to content

Commit

Permalink
Merge pull request #42 from montanaflynn/master
Browse files Browse the repository at this point in the history
Example fix
  • Loading branch information
doug-martin committed Jun 5, 2014
2 parents 26385d8 + c660528 commit 0e9d588
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var stream = fs.createReadStream("my.csv");

var csvStream = csv()
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -63,7 +63,7 @@ var csv = require("fast-csv");
csv
.fromPath("my.csv")
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -84,7 +84,7 @@ var CSV_STRING = 'a,b\n' +
csv
.fromPath(CSV_STRING, {headers: true})
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -101,7 +101,7 @@ var stream = fs.createReadStream("my.csv");
csv()
.fromStream(stream)
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -117,7 +117,7 @@ var stream = fs.createReadStream("my.csv");
csv()
.fromStream(stream, {headers : true})
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -134,7 +134,7 @@ var stream = fs.createReadStream("my.csv");
csv
.fromStream(stream, {headers : ["firstName", "lastName", "address"]})
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -153,7 +153,7 @@ var stream = fs.createReadStream("my.csv");
csv
.fromStream(stream, {ignoreEmpty: true})
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -178,7 +178,7 @@ csv(
//do something with invalid row
})
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand All @@ -200,7 +200,7 @@ csv
return data.reverse(); //reverse each row.
})
.on("record", function(data){
console.log(data):
console.log(data);
})
.on("end", function(){
console.log("done");
Expand Down

0 comments on commit 0e9d588

Please sign in to comment.