Console utility for parsing json and csv files. Utility can work with input file and in generate data mode.
- Parse input file in csv or json format
- Create random data in the specified amount
- Output to the console the name, surname and age of the oldest user.
- Output to the console the name, surname and counter of the user's most frequently encountered surname.
- Create output file in the specified format (json or csv)
- E2E tests for main logic of utility
npm install
Option | Short type | by Defualt | Description |
---|---|---|---|
--input | -i | false | Path for input file. |
--count | -c | 10 | The numeric value of the number of records in the output file (not compatible with the --count parameter) |
--output | -o | output-file.json | The name of the output file. The file is saved in the /output-files folder. |
--help | -h | false | Display info for CLI parameters. |
By default without any CLI parameters, utility work in generate node with default value in counter.
Note: Output files saved in folder
./output-files
.
After running, the utility automatically remove otput folder.
Input file mode :
npm run app -- --input /path/to/input/file.json --output /path/to/output/file.json
Generate data mode :
npm run app -- --count 20 --output /path/to/output/file.json
npm run test