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

@mrodrig/json-2-csv-cli

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mrodrig/json-2-csv-cli - npm Package Compare versions

Comparing version 4.1.0 to 5.0.0

20

bin/utils/utils.js

@@ -39,6 +39,6 @@ 'use strict';

params.conversion = 'json2csv';
params.converter = converter.json2csvAsync;
params.converter = converter.json2csv;
} else if (params.csv) {
params.conversion = 'csv2json';
params.converter = converter.csv2jsonAsync;
params.converter = converter.csv2json;
} else {

@@ -54,13 +54,9 @@ return Promise.reject('No data provided for conversion');

case 'json2csv':
return params.converter(params.json, params.options)
.then((outputData) => {
params.outputData = outputData;
return params;
});
const csv = params.converter(params.json, params.options);
params.outputData = csv;
return params;
case 'csv2json':
return params.converter(params.csv, params.options)
.then((outputData) => {
params.outputData = outputData;
return params;
});
const json = params.converter(params.csv, params.options);
params.outputData = json;
return params;
default:

@@ -67,0 +63,0 @@ return Promise.reject('Invalid conversion specified.');

8

package.json

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

"description": "CLI for the json-2-csv package",
"version": "4.1.0",
"version": "5.0.0",
"repository": {

@@ -33,9 +33,9 @@ "type": "git",

"dependencies": {
"commander": "9.4.1",
"json-2-csv": "3.20.0"
"commander": "11.1.0",
"json-2-csv": "5.0.0"
},
"engines": {
"node": ">= 12"
"node": ">= 18"
},
"license": "MIT"
}

@@ -6,6 +6,4 @@ # json-2-csv-cli

[![Dependencies](https://img.shields.io/david/mrodrig/json-2-csv-cli.svg)](https://www.npmjs.org/package/@mrodrig/json-2-csv-cli)
[![Downloads](http://img.shields.io/npm/dm/@mrodrig/json-2-csv-cli.svg)](https://www.npmjs.org/package/@mrodrig/json-2-csv-cli)
[![NPM version](https://img.shields.io/npm/v/@mrodrig/json-2-csv-cli.svg)](https://www.npmjs.org/package/@mrodrig/json-2-csv-cli)
[![Known Vulnerabilities](https://snyk.io/test/npm/@mrodrig/json-2-csv-cli/badge.svg)](https://snyk.io/test/npm/@mrodrig/json-2-csv-cli)
[![Downloads](https://img.shields.io/npm/dm/@mrodrig/json-2-csv-cli.svg)](https://www.npmjs.org/package/@mrodrig/json-2-csv-cli)

@@ -12,0 +10,0 @@ ## Installation

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