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 5.3.0 to 5.4.0

1

lib/constants.js

@@ -17,2 +17,3 @@ 'use strict';

exports.defaultJson2CsvOptions = {
arrayIndexesAsKeys: false,
checkSchemaDifferences: false,

@@ -19,0 +20,0 @@ delimiter: {

@@ -33,2 +33,3 @@ 'use strict';

const wrapDelimiterCheckRegex = new RegExp(options.delimiter.wrap, 'g'), crlfSearchRegex = /\r?\n|\r/, customValueParser = options.parseValue && typeof options.parseValue === 'function' ? options.parseValue : null, expandingWithoutUnwinding = options.expandArrayObjects && !options.unwindArrays, deeksOptions = {
arrayIndexesAsKeys: options.arrayIndexesAsKeys,
expandNestedObjects: options.expandNestedObjects,

@@ -35,0 +36,0 @@ expandArrayObjects: expandingWithoutUnwinding,

@@ -76,2 +76,6 @@ interface DelimiterOptions {

export interface Json2CsvOptions extends SharedConverterOptions {
/** Should array indexes be included in the generated keys?
* @default false
*/
arrayIndexesAsKeys?: boolean;
/**

@@ -78,0 +82,0 @@ * Should all documents have the same schema?

6

package.json

@@ -8,3 +8,3 @@ {

"description": "A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.",
"version": "5.3.0",
"version": "5.4.0",
"homepage": "https://mrodrig.github.io/json-2-csv",

@@ -43,4 +43,4 @@ "repository": {

"dependencies": {
"deeks": "3.0.2",
"doc-path": "4.0.2"
"deeks": "3.1.0",
"doc-path": "4.1.0"
},

@@ -47,0 +47,0 @@ "devDependencies": {

@@ -53,2 +53,5 @@ # json-2-csv

* `options` - (Optional) A JSON document specifying any of the following key value pairs:
* `arrayIndexesAsKeys` - Boolean - Should array indexes be included in the generated keys?
* Default: `false`
* Note: This provides a more accurate representation of the JSON in the returned CSV, but may be less human readable. See [#207](https://github.com/mrodrig/json-2-csv/issues/207) for more details.
* `checkSchemaDifferences` - Boolean - Should all documents have the same schema?

@@ -55,0 +58,0 @@ * Default: `false`

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