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

json2csv

Package Overview
Dependencies
Maintainers
4
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json2csv - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [5.0.1](https://github.com/zemirco/json2csv/compare/v5.0.0...v5.0.1) (2020-04-28)
### Bug Fixes
* wrong call to processValue ([#454](https://github.com/zemirco/json2csv/issues/454)) ([66abd45](https://github.com/zemirco/json2csv/commit/66abd45))
## [5.0.0](https://github.com/zemirco/json2csv/compare/v4.5.2...v5.0.0) (2020-03-15)

@@ -7,0 +14,0 @@

2

lib/JSON2CSVBase.js

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

return fastJoin(
this.opts.fields.map(fieldInfo => this.processValue(fieldInfo.label, true)),
this.opts.fields.map(fieldInfo => this.processValue(fieldInfo.label)),
this.opts.delimiter

@@ -99,0 +99,0 @@ );

{
"name": "json2csv",
"version": "5.0.0",
"version": "5.0.1",
"description": "Convert JSON to CSV",

@@ -5,0 +5,0 @@ "keywords": [

@@ -668,3 +668,3 @@ # json2csv

const fields = ['carModel', 'price', 'colors'];
const transforms = [unwind('colors')];
const transforms = [unwind({ paths: ['colors'] })];

@@ -697,3 +697,3 @@ const json2csvParser = new Parser({ fields, transforms });

```js
const { Parser } = require('json2csv');
const { Parser, transforms: { unwind } } = require('json2csv');

@@ -745,3 +745,3 @@ const myCars = [

const fields = ['carModel', 'price', 'items.name', 'items.color', 'items.items.position', 'items.items.color'];
const transforms = [unwind(['items', 'items.items'])];
const transforms = [unwind({ paths: ['items', 'items.items'] })];
const json2csvParser = new Parser({ fields, transforms });

@@ -770,3 +770,3 @@ const csv = json2csvParser.parse(myCars);

```js
const { Parser } = require('json2csv');
const { Parser, transforms: { unwind } } = require('json2csv');

@@ -818,3 +818,3 @@ const myCars = [

const fields = ['carModel', 'price', 'items.name', 'items.color', 'items.items.position', 'items.items.color'];
const transforms = [unwind(['items', 'items.items'], true)];
const transforms = [unwind({ paths: ['items', 'items.items'], blankOut: true })];

@@ -885,3 +885,3 @@ const json2csvParser = new Parser({ fields, transforms });

const { Parser, transform: { unwind, flatten } } = require('json2csv');
const json2csvParser = new Parser({ transforms: [unwind(paths, true), flatten('__')] });
const json2csvParser = new Parser({ transforms: [unwind({ paths, blankOut: true }), flatten('__')] });
const csv = json2csvParser.parse(myData);

@@ -888,0 +888,0 @@ ```

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