Unixify
hugooliveirad opened this issue · comments
Great module @rafaelrinaldi!
One useful feature would be to "unixify" the output. I think npm-downloads
could be very similar to the wc
utility.
A excerpt from the wc
manpage:
The following options are available:
-c The number of bytes in each input file is written to the standard output. This will cancel out any prior usage of the -m option.
-l The number of lines in each input file is written to the standard output.
-m The number of characters in each input file is written to the standard output. If the current locale does not support multibyte
characters, this is equivalent to the -c option. This will cancel out any prior usage of the -c option.
-w The number of words in each input file is written to the standard output.
npm-downloads
could come with:
-d
to display the number of downloads on npm from last day-w
to display the number of downloads on npm from last week-m
to display the number of downloads on npm from last month
And also simplify the output, removing the spinner, tabulation and number formatting.
I see this being used to create statistical utilities and more with ease.
@hugobessaa Hey Hugo, thanks for jumping in with feedback!
Yeah, I thought about that when I was writing it for the first time but I decided it was a YAGN back then. It might be a good addition indeed.
@hugobessaa Will close this issue as I think the current behavior already does what I expected it to do. Feel free to give it a shot though 😉