ahmadawais / corona-cli

🦠 Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). https://x.com/MrAhmadAwais
https://NodeCLI.com
MIT License
1.85k stars 191 forks source link

📦 NEW: Reverse order of output #40

Closed asharirfan closed 4 years ago

asharirfan commented 4 years ago

Description

This PR adds --reverse flag to the CLI, which reverses the order of output.

Usage

corona --reverse
corona --sort cases --reverse
corona -s cases -r

Applicable Issues

23

ahmadawais commented 4 years ago

Thank you, Ashar!

Please update the PR in light of the latest release.

🔗 https://github.com/ahmadawais/corona-cli/releases/tag/3.4.0 🔗 https://www.npmjs.com/package/corona-cli

asharirfan commented 4 years ago

Just updated the PR with the latest release.

ahmadawais commented 4 years ago

Thank you, Ashar. Accepting the PR but do read the comments. I'll address them myself.

ahmadawais commented 4 years ago

Also why is reverse a string?

ahmadawais commented 4 years ago

Done

🔗 https://github.com/ahmadawais/corona-cli/releases/tag/3.5.0 🔗 https://www.npmjs.com/package/corona-cli

Check out the final code.

alf946 commented 4 years ago

On: $ corona -r -s cases -l 10 produces (greatest number) top 10 with reverse sorting, not the (least number) top 10 sorted least to most.