Socket
Socket
Sign inDemoInstall

csv-stringify

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-stringify - npm Package Compare versions

Comparing version 5.6.0 to 5.6.1

6

CHANGELOG.md
# Changelog
## Version 5.6.1
* fix: memory leak in sync
* refactor: remove unsused values
* fix: add browserify dev dep
## Version 5.6.0

@@ -5,0 +11,0 @@

21

lib/es5/index.js

@@ -122,5 +122,2 @@ "use strict";

};
_assertThisInitialized(_this);
return _this;

@@ -343,18 +340,20 @@ }

var chunk_string;
if (this.options.eof) {
chunk = this.stringify(chunk);
chunk_string = this.stringify(chunk);
if (chunk === undefined) {
if (chunk_string === undefined) {
return;
} else {
chunk = chunk + this.options.record_delimiter;
chunk_string = chunk_string + this.options.record_delimiter;
}
} else {
chunk = this.stringify(chunk);
chunk_string = this.stringify(chunk);
if (chunk === undefined) {
if (chunk_string === undefined) {
return;
} else {
if (this.options.header || this.info.records) {
chunk = this.options.record_delimiter + chunk;
chunk_string = this.options.record_delimiter + chunk_string;
}

@@ -366,5 +365,4 @@ }

this.info.records++;
this.push(chunk);
this.push(chunk_string);
callback();
null;
}

@@ -380,3 +378,2 @@ }, {

callback();
null;
}

@@ -383,0 +380,0 @@ }, {

@@ -23,10 +23,11 @@ "use strict";

var stringifier = new stringify.Stringifier(options);
stringifier.push = function (record) {
function onData(record) {
if (record) {
data.push(record.toString());
}
};
}
var stringifier = new stringify.Stringifier(options);
stringifier.on('data', onData);
var _iterator = _createForOfIteratorHelper(records),

@@ -47,3 +48,4 @@ _step;

stringifier.end();
stringifier.off('data', onData);
return data.join('');
};

@@ -52,3 +52,2 @@

}
this
}

@@ -233,16 +232,17 @@ normalize(options){

// Convert the record into a string
let chunk_string
if(this.options.eof){
chunk = this.stringify(chunk)
if(chunk === undefined){
chunk_string = this.stringify(chunk)
if(chunk_string === undefined){
return
}else{
chunk = chunk + this.options.record_delimiter
chunk_string = chunk_string + this.options.record_delimiter
}
}else{
chunk = this.stringify(chunk)
if(chunk === undefined){
chunk_string = this.stringify(chunk)
if(chunk_string === undefined){
return
}else{
if(this.options.header || this.info.records){
chunk = this.options.record_delimiter + chunk
chunk_string = this.options.record_delimiter + chunk_string
}

@@ -253,5 +253,4 @@ }

this.info.records++
this.push(chunk)
this.push(chunk_string)
callback()
null
}

@@ -264,3 +263,2 @@ _flush(callback){

callback()
null
}

@@ -267,0 +265,0 @@ stringify(chunk, chunkIsHeader=false){

@@ -11,4 +11,3 @@

}
const stringifier = new stringify.Stringifier(options)
stringifier.push = function(record){
function onData(record){
if(record){

@@ -18,2 +17,4 @@ data.push(record.toString())

}
let stringifier = new stringify.Stringifier(options)
stringifier.on('data', onData);
for(let record of records){

@@ -23,3 +24,4 @@ stringifier.write(record)

stringifier.end()
stringifier.off('data', onData);
return data.join('')
}
{
"version": "5.6.0",
"version": "5.6.1",
"name": "csv-stringify",

@@ -37,2 +37,3 @@ "description": "CSV stringifier implementing the Node.js `stream.Transform` API",

"@types/should": "^13.0.0",
"browserify": "^17.0.0",
"coffeescript": "~2.5.1",

@@ -39,0 +40,0 @@ "csv-generate": "~3.2.4",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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