Comparing version 0.5.7 to 0.5.8
@@ -66,2 +66,5 @@ | ||
}else{ | ||
if (len ===1){ // original column is empty quote pairs like "" | ||
e=""; | ||
} | ||
row.push(e); | ||
@@ -68,0 +71,0 @@ continue; |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.5.7", | ||
"version": "0.5.8", | ||
"keywords": [ | ||
@@ -24,0 +24,0 @@ "csv", |
@@ -338,2 +338,19 @@ var Converter = require("../libs/core/Converter.js"); | ||
}) | ||
it ("should handle when there is an empty string",function(done){ | ||
var testData = __dirname + "/data/dataWithEmptyString"; | ||
var rs = fs.createReadStream(testData); | ||
var st = rs.pipe(new Converter({ | ||
noheader:true, | ||
headers:["a","b", "c"] | ||
})); | ||
st.on("end_parsed",function (res){ | ||
var j = res[0]; | ||
// assert(res.length===2); | ||
assert(j.a==="green"); | ||
assert(j.b===40); | ||
assert.equal(j.c,""); | ||
done(); | ||
}); | ||
}) | ||
}); |
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
785621
75
12020