Comparing version 0.4.7 to 0.4.8
@@ -69,3 +69,3 @@ var util = require("util"); | ||
this.child.stdout.on("data", function(d, e) { | ||
this.push(d, e); | ||
// this.push(d, e); | ||
// this.emit("record_parsed"); | ||
@@ -90,3 +90,6 @@ }.bind(this)); | ||
args.unshift("error"); | ||
this.hasError=true; | ||
this.emit.apply(this, args); | ||
}else{ | ||
this.push(msg); | ||
} | ||
@@ -164,2 +167,6 @@ }.bind(this)); | ||
this.sequenceBuffer[index] = undefined; | ||
if (obj.resultRow === null){ // empty. skip | ||
this.recordNum++; | ||
continue; | ||
} | ||
var resultRow = obj.resultRow; | ||
@@ -166,0 +173,0 @@ var row = obj.row; |
@@ -20,9 +20,10 @@ var params = JSON.parse(process.env.params); | ||
converter.pipe(process.stdout); | ||
// converter.on("data", function() { | ||
// // var args = Array.prototype.slice.call(arguments, 0) | ||
// // process.send({ | ||
// // action: "data", | ||
// // arguments: args | ||
// // }); | ||
// }); | ||
converter.on("data", function(d) { | ||
process.send(d.toString("utf8")); | ||
// var args = Array.prototype.slice.call(arguments, 0) | ||
// process.send({ | ||
// action: "data", | ||
// arguments: args | ||
// }); | ||
}); | ||
converter.on("error",function(){ | ||
@@ -29,0 +30,0 @@ var args = Array.prototype.slice.call(arguments, 0); |
@@ -79,2 +79,3 @@ /** | ||
}else{ | ||
this.emit("record_parsed",null,row,index -1); | ||
//Empty row detedted. skip | ||
@@ -81,0 +82,0 @@ } |
@@ -36,2 +36,3 @@ var Writable = require("stream").Writable; | ||
Result.prototype.getBuffer = function() { | ||
// console.log(this.buffer); | ||
return JSON.parse(this.buffer); | ||
@@ -38,0 +39,0 @@ }; |
@@ -45,3 +45,3 @@ /** | ||
}else{ | ||
cb(null); | ||
cb(null,null,res.row,res.index); | ||
} | ||
@@ -48,0 +48,0 @@ } |
@@ -87,3 +87,6 @@ var parserMgr = require("./parserMgr.js"); | ||
} else { | ||
cb(); | ||
cb(null,{ | ||
row:row, | ||
index:index | ||
}); | ||
} | ||
@@ -90,0 +93,0 @@ |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"keywords": [ | ||
@@ -24,0 +24,0 @@ "csv", |
@@ -278,3 +278,3 @@ var Converter = require("../libs/core/Converter.js"); | ||
var j = res[0]; | ||
assert(res.length === 2); | ||
assert(res.length === 3); | ||
assert (j.col2.length === 1); | ||
@@ -285,2 +285,3 @@ assert(j.col2[0] === "d3"); | ||
assert(res[1].col1==="d2"); | ||
assert(res[2].col1==="d4"); | ||
done(); | ||
@@ -287,0 +288,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
363194
2262