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

jsonexport

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonexport - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

.bithoundrc

12

lib/core/stream.js

@@ -14,2 +14,3 @@ /* jshint node:true */

this._hasHeaders = false;
this._lastError = null;
}

@@ -20,4 +21,4 @@

self._extra = self._extra || "";
// Memory limit
if (self._extra > chunk.toString().length * 3) return null;
// Memory limit
if (self._extra.length > chunk.toString().length * 3) return null;
// Remove starting comma

@@ -42,4 +43,4 @@ if (self._extra.charAt(0) == ',') self._extra = self._extra.substr(1);

// Append extra data to chunk data
chunk = this._mergeChunk(chunk);
if (!chunk) return done(new Error("Invalid JSON"));
chunk = this._mergeChunk(chunk);
if (!chunk) return done(this._lastError);
// Split chunk in objects

@@ -52,2 +53,3 @@ let parts = chunk.split('}');

} catch (ex) {
this._lastError = ex;
let extraChunk = parts.pop();

@@ -57,3 +59,3 @@ self._extra = extraChunk + (self._extra || "");

}
}
}
if (!json) return done();

@@ -60,0 +62,0 @@ this._parser.parse(json, (err, csvChunk) => {

@@ -9,2 +9,6 @@ /* jshint node:true */

this._options = options;
this._options.handleString = this._options.handleString || this._handleString;
this._options.handleNumber = this._options.handleNumber || this._handleNumber;
this._options.handleBoolean = this._options.handleBoolean || this._handleBoolean;
this._options.handleDate = this._options.handleDate || this._handleDate;
}

@@ -31,3 +35,3 @@

item: item,
value: (this._options.handleString || this._handleString)(element, item),
value: this._options.handleString(element, item),
}];

@@ -39,3 +43,3 @@ }

item: item,
value: (this._options.handleNumber || this._handleNumber)(element, item),
value: this._options.handleNumber(element, item),
}];

@@ -47,3 +51,3 @@ }

item: item,
value: (this._options.handleBoolean || this._handleBoolean).bind(this)(element, item),
value: this._options.handleBoolean.bind(this)(element, item),
}];

@@ -55,3 +59,3 @@ }

item: item,
value: (this._options.handleDate || this._handleDate)(element, item),
value: this._options.handleDate(element, item),
}];

@@ -58,0 +62,0 @@ }

{
"name": "jsonexport",
"version": "2.0.8",
"version": "2.0.9",
"description": "Makes easy to convert JSON to CSV",

@@ -5,0 +5,0 @@ "main": "./lib",

Sorry, the diff of this file is not supported yet

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