Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csvtojson

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csvtojson - npm Package Compare versions

Comparing version 0.5.7 to 0.5.8

test/data/dataWithEmptyString

3

libs/core/utils.js

@@ -66,2 +66,5 @@

}else{
if (len ===1){ // original column is empty quote pairs like ""
e="";
}
row.push(e);

@@ -68,0 +71,0 @@ continue;

2

package.json

@@ -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();
});
})
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc