json-2-csv
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -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", |
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
157360