diff --git a/README.md b/README.md index d177866..a1adfff 100755 --- a/README.md +++ b/README.md @@ -240,40 +240,56 @@ $ npm install @mrodrig/json-2-csv-cli ``` Usage: json2csv [options] +Arguments: + jsonFile JSON file to convert + Options: -V, --version output the version number -o, --output [output] Path of output file. If not provided, then stdout will be used - -f, --field Optional field delimiter - -w, --wrap Optional wrap delimiter - -e, --eol Optional end of line delimiter + -a, --array-indexes-as-keys Includes array indexes in the generated keys + -S, --check-schema Check for schema differences + -f, --field Field delimiter + -w, --wrap Wrap delimiter + -e, --eol End of Line delimiter + -E, --empty-field-value Empty field value + -n, --expand-nested-objects Expand nested objects to be deep converted to CSV + -k, --keys [keys] Keys of documents to convert to CSV + -d, --escape-header-nested-dots Escape header nested dots -b, --excel-bom Excel Byte Order Mark character prepended to CSV + -x, --exclude-keys [keys] Comma separated list of keys to exclude + -A, --expand-array-objects Expand array objects -W, --without-header Withhold the prepended header + -p, --prevent-csv-injection Prevent CSV Injection -s, --sort-header Sort the header fields - -H, --trim-header Trim header fields -F, --trim-fields Trim field values - -S, --check-schema Check for schema differences - -E, --empty-field-value Empty field value - -A, --expand-array-objects Expand array objects - -k, --keys [keys] Keys of documents to convert to CSV - -h, --help output usage information + -H, --trim-header Trim header fields + -U, --unwind-arrays Unwind array values to their own CSV line + -I, --iso-date-format Use ISO 8601 date format + -L, --locale-format Use locale format for values + -B, --wrap-booleans Wrap booleans + -h, --help display help for command ``` #### csv2json ``` Usage: csv2json [options] +Arguments: + csvFile CSV file to convert + Options: - -V, --version output the version number - -c, --csv Path of json file to be converted - -o, --output [output] Path of output file. If not provided, then stdout will be used - -f, --field Optional field delimiter - -w, --wrap Optional wrap delimiter - -e, --eol Optional end of line delimiter - -b, --excel-bom Excel Byte Order Mark character prepended to CSV - -H, --trim-header Trim header fields - -F, --trim-fields Trim field values - -k, --keys [keys] Keys of documents to convert to CSV - -h, --help output usage information + -V, --version output the version number + -o, --output [output] Path of output file. If not provided, then stdout will be used + -f, --field Field delimiter + -w, --wrap Wrap delimiter + -e, --eol End of Line delimiter + -b, --excel-bom Excel Byte Order Mark character prepended to CSV + -p, --prevent-csv-injection Prevent CSV Injection + -F, --trim-fields Trim field values + -H, --trim-header Trim header fields + -h, --header-fields Specify the fields names in place a header line in the CSV itself + -k, --keys [keys] Keys of documents to convert to CSV + --help display help for command ``` ## Tests diff --git a/package-lock.json b/package-lock.json index 49e888e..4267c1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "json-2-csv", - "version": "5.5.3", + "version": "5.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "json-2-csv", - "version": "5.5.3", + "version": "5.5.4", "license": "MIT", "dependencies": { "deeks": "3.1.0", diff --git a/package.json b/package.json index 244ae98..62d8042 100755 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ }, "name": "json-2-csv", "description": "A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.", - "version": "5.5.3", + "version": "5.5.4", "homepage": "https://mrodrig.github.io/json-2-csv", "repository": { "type": "git", diff --git a/src/constants.ts b/src/constants.ts index ac59c3b..735cd87 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -52,7 +52,6 @@ export const defaultCsv2JsonOptions: DefaultCsv2JsonOptions = { preventCsvInjection: false, trimFieldValues : false, trimHeaderFields: false, - wrapBooleans: false, }; export const excelBOM = '\ufeff'; diff --git a/src/types.ts b/src/types.ts index 57535ee..2646d2f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -187,7 +187,7 @@ export interface DefaultCsv2JsonOptions extends Pick, Pick, // Then extend the types with required fields and specific fields omitted: - Omit, 'headerFields'>, 'parseValue'> {} + Omit, 'keys'>, 'headerFields'>, 'parseValue'> {} export interface FullJson2CsvOptions extends DefaultJson2CsvOptions { /**