Socket
Socket
Sign inDemoInstall

json-2-csv

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-2-csv - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

2

lib/converter.js

@@ -5,3 +5,3 @@ 'use strict';

csv2Json = require('./csv-2-json'), // Require our csv-2-json code
constants = require('./constants'), // Require in constants
constants = require('./constants.json'), // Require in constants
docPath = require('doc-path'),

@@ -8,0 +8,0 @@ _ = require('underscore'); // Require underscore

@@ -82,3 +82,3 @@ 'use strict';

// If we have another nested document, recur on the sub-document to retrieve the full key name
if (_.isObject(data[currentKey]) && !_.isNull(data[currentKey]) && _.isUndefined(data[currentKey].length) && _.keys(data[currentKey]).length) {
if (_.isObject(data[currentKey]) && !_.isNull(data[currentKey]) && !_.isArray(data[currentKey]) && _.keys(data[currentKey]).length) {
return generateDocumentHeading(keyName, data[currentKey]);

@@ -89,3 +89,3 @@ }

});
return documentKeys; // Return the headings joined by our field delimiter

@@ -92,0 +92,0 @@ };

@@ -5,3 +5,3 @@ {

"description": "A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.",
"version": "2.0.5",
"version": "2.0.6",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

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