Skip to content

Commit a98653b

Browse files
committed
docs: update CLI options
1 parent e9801d3 commit a98653b

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

README.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -240,40 +240,56 @@ $ npm install @mrodrig/json-2-csv-cli
240240
```
241241
Usage: json2csv <jsonFile> [options]
242242
243+
Arguments:
244+
jsonFile JSON file to convert
245+
243246
Options:
244247
-V, --version output the version number
245248
-o, --output [output] Path of output file. If not provided, then stdout will be used
246-
-f, --field <delimiter> Optional field delimiter
247-
-w, --wrap <delimiter> Optional wrap delimiter
248-
-e, --eol <delimiter> Optional end of line delimiter
249+
-a, --array-indexes-as-keys Includes array indexes in the generated keys
250+
-S, --check-schema Check for schema differences
251+
-f, --field <delimiter> Field delimiter
252+
-w, --wrap <delimiter> Wrap delimiter
253+
-e, --eol <delimiter> End of Line delimiter
254+
-E, --empty-field-value <value> Empty field value
255+
-n, --expand-nested-objects Expand nested objects to be deep converted to CSV
256+
-k, --keys [keys] Keys of documents to convert to CSV
257+
-d, --escape-header-nested-dots Escape header nested dots
249258
-b, --excel-bom Excel Byte Order Mark character prepended to CSV
259+
-x, --exclude-keys [keys] Comma separated list of keys to exclude
260+
-A, --expand-array-objects Expand array objects
250261
-W, --without-header Withhold the prepended header
262+
-p, --prevent-csv-injection Prevent CSV Injection
251263
-s, --sort-header Sort the header fields
252-
-H, --trim-header Trim header fields
253264
-F, --trim-fields Trim field values
254-
-S, --check-schema Check for schema differences
255-
-E, --empty-field-value <value> Empty field value
256-
-A, --expand-array-objects Expand array objects
257-
-k, --keys [keys] Keys of documents to convert to CSV
258-
-h, --help output usage information
265+
-H, --trim-header Trim header fields
266+
-U, --unwind-arrays Unwind array values to their own CSV line
267+
-I, --iso-date-format Use ISO 8601 date format
268+
-L, --locale-format Use locale format for values
269+
-B, --wrap-booleans Wrap booleans
270+
-h, --help display help for command
259271
```
260272

261273
#### csv2json
262274
```
263275
Usage: csv2json <csvFile> [options]
264276
277+
Arguments:
278+
csvFile CSV file to convert
279+
265280
Options:
266-
-V, --version output the version number
267-
-c, --csv <csv> Path of json file to be converted
268-
-o, --output [output] Path of output file. If not provided, then stdout will be used
269-
-f, --field <delimiter> Optional field delimiter
270-
-w, --wrap <delimiter> Optional wrap delimiter
271-
-e, --eol <delimiter> Optional end of line delimiter
272-
-b, --excel-bom Excel Byte Order Mark character prepended to CSV
273-
-H, --trim-header Trim header fields
274-
-F, --trim-fields Trim field values
275-
-k, --keys [keys] Keys of documents to convert to CSV
276-
-h, --help output usage information
281+
-V, --version output the version number
282+
-o, --output [output] Path of output file. If not provided, then stdout will be used
283+
-f, --field <delimiter> Field delimiter
284+
-w, --wrap <delimiter> Wrap delimiter
285+
-e, --eol <delimiter> End of Line delimiter
286+
-b, --excel-bom Excel Byte Order Mark character prepended to CSV
287+
-p, --prevent-csv-injection Prevent CSV Injection
288+
-F, --trim-fields Trim field values
289+
-H, --trim-header Trim header fields
290+
-h, --header-fields Specify the fields names in place a header line in the CSV itself
291+
-k, --keys [keys] Keys of documents to convert to CSV
292+
--help display help for command
277293
```
278294

279295
## Tests

0 commit comments

Comments
 (0)