1- const logSymbols = require ( "log-symbols" ) ;
1+ const sym = require ( "log-symbols" ) ;
22const chalk = require ( "chalk" ) ;
33const cyan = chalk . cyan ;
44const dim = chalk . dim ;
55
66const infoStates = ( ) =>
7- console . log ( `
8- \n${ logSymbols . info } ${ cyan ( `KEY:` ) }
7+ console . log (
8+ dim ( `
9+ \n${ sym . info } ${ cyan ( `KEY:` ) }
910${ dim ( `❯ ` ) } ${ cyan ( `State:` ) } Name of the state
1011${ dim ( `❯ ` ) } ${ cyan ( `Cases:` ) } Total number of cases in a country
1112${ dim ( `❯ ` ) } ${ cyan ( `Cases (today):` ) } Cases in 24 hours GMT/UTC
1213${ dim ( `❯ ` ) } ${ cyan ( `Deaths:` ) } Total number of deaths in a state
1314${ dim ( `❯ ` ) } ${ cyan ( `Deaths (today):` ) } Deaths in 24 hours GMT/UTC
1415${ dim ( `❯ ` ) } ${ cyan ( `Recovered:` ) } Total number of recovered people
1516${ dim ( `❯ ` ) } ${ cyan ( `Active:` ) } Total number of active patients
16- ` ) ;
17+ ` )
18+ ) ;
1719
1820const infoCountries = ( ) =>
19- console . log ( `
20- \n${ logSymbols . info } ${ cyan ( `KEY:` ) }
21+ console . log (
22+ dim ( `
23+ \n${ sym . info } ${ cyan ( `KEY:` ) }
2124${ dim ( `❯ ` ) } ${ cyan ( `Country:` ) } Name of the country
2225${ dim ( `❯ ` ) } ${ cyan ( `Cases:` ) } Total number of cases in a country
2326${ dim ( `❯ ` ) } ${ cyan ( `Cases (today):` ) } Cases in 24 hours GMT/UTC
@@ -27,15 +30,17 @@ ${dim(`❯ `)}${cyan(`Recovered:`)} Total number of recovered people
2730${ dim ( `❯ ` ) } ${ cyan ( `Active:` ) } Total number of active patients
2831${ dim ( `❯ ` ) } ${ cyan ( `Critical:` ) } Total number of critical patients
2932${ dim ( `❯ ` ) } ${ cyan ( `Per Million:` ) } Affected patients per million
30- ` ) ;
33+ ` )
34+ ) ;
3135
32- module . exports = async states => {
36+ module . exports = async ( lastUpdated , states ) => {
37+ console . log ( dim ( `${ sym . info } ${ cyan ( `Last Updated:` ) } ${ lastUpdated } ` ) ) ;
3338 states && infoStates ( ) ;
3439 ! states && infoCountries ( ) ;
3540 console . log (
36- `\n${ logSymbols . success } ${ dim (
41+ `\n${ sym . success } ${ dim (
3742 `Star the repo for updates → https://git.io/corona-cli`
38- ) } \n${ logSymbols . info } ${ dim (
43+ ) } \n${ sym . info } ${ dim (
3944 `Follow for more CLIs → https://twitter.com/MrAhmadAwais\n\n`
4045 ) } `
4146 ) ;
0 commit comments