Closed mifkata closed 4 years ago
@ahmadawais Hello, just a friendly reminder to review this :) Thank you!
🔗 https://github.com/ahmadawais/corona-cli/releases/tag/5.1.0 🔗 https://www.npmjs.com/package/corona-cli
Thanks a lot @mifkata for working on this.
One improvement I can think of is that the keys for JSON could be
country
, cases
, 'cases-today'
, deaths
, 'deaths-today'
, recovered
, active
, critical
, 'per-million'
.
One improvement I can think of is that the keys for JSON could be
country
,cases
,'cases-today'
,deaths
,'deaths-today'
,recovered
,active
,critical
,'per-million'
.
Do you want me to open a PR for it @ahmadawais ? :)
Sure thing.
issue #11
Overview
This PR is about changing the output format from
Table
toJsonOutput
(a simplified Json formatter). It doesn't change anything about current logic in regards to data fetching and sorting. The only difference is that:corona --json > output.json
comma-number
, but instead return plain integerscli.flags.json === true
all coloring functions inutils/table.js
will return plain text insteadHow to test
corona --json
- normal runcorona -j
- same as above using short-handlecorona --json > output.json
- output tooutput.json
and check the formatting (Prettifying JSON helps)