@mrodrig/json-2-csv-cli
Advanced tools
Comparing version 4.1.0 to 5.0.0
@@ -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.'); |
@@ -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 |
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
9719
167
69
+ Addedcommander@11.1.0(transitive)
+ Addeddeeks@3.0.2(transitive)
+ Addeddoc-path@4.0.2(transitive)
+ Addedjson-2-csv@5.0.0(transitive)
- Removedcommander@9.4.1(transitive)
- Removeddeeks@2.6.1(transitive)
- Removeddoc-path@3.1.0(transitive)
- Removedjson-2-csv@3.20.0(transitive)
Updatedcommander@11.1.0
Updatedjson-2-csv@5.0.0