Skip to content

Commit a6671d8

Browse files
committed
Filter table locally with --top
1 parent 58a00db commit a6671d8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,20 @@ const { argv } = yargs
4242
alias: 'color',
4343
describe: 'Show colors formatted output',
4444
type: 'boolean'
45+
},
46+
t: {
47+
alias: 'top',
48+
describe: 'Filter table by rank',
49+
type: 'int'
4550
}
4651
})
4752
.strict()
4853
.help('help');
4954

50-
const { emojis, country } = argv;
55+
const { top, emojis, country } = argv;
5156
(
5257
country === 'ALL'
53-
? getCompleteTable(emojis)
58+
? getCompleteTable(top, emojis)
5459
: getCountryTable(country, emojis)
5560
)
5661
.then(console.log)

0 commit comments

Comments
 (0)