DEV Community

Sasha Blagojevic
Sasha Blagojevic

Posted on • Updated on • Originally published at sasablagojevic.com

Online NPM downloads calculator

Npm package manager

Hey guys, long time no read!

Besides being a T-shaped full stack developer at JSGuru (a fancy and made up term I identify with now), additionally I work as part of the sales team and I'm also one of the people that manages our open source efforts

All these responsibilities mean that I have quite a few meetings over the week and I need to produce numbers so we can track our analytics, and that includes the number of downloads of our open source projects.

To make my life a bit easier I made an AI bot that calculates all downloads for a given NPM package and given period... lol just jokin', it's not AI, it's just a few if statements and a function here and there. ;)

A really simple tool but it gets the job done.

Try it out, it might come useful to you as well. I have a few ideas for new features, I'll be adding them from time to time. :)

Top comments (3)

Collapse
 
peter profile image
Peter Kim Frank

Hey Sasa, I'm a big fan. Look forward to playing around more. A few quick thoughts:

  • Maybe have some of the additional options (Range v. Point // Time Period) default-selected. That will make it a little easier to try it out as a first-time user
  • The placeholder text is a little dark. I immediately just clicked "Go!" because I thought it was actually filled in for me. Making it lighter could help the user understand that it's just a placeholder.
  • Right now the graph is rendering a tiny bit weird because it's so wide. Setting a max-width on that div might help.
  • Can you add a "leaderboard" or just some suggested packages somewhere on the page? It might help people understand how to get going.

Great job!

Collapse
 
blackcat_dev profile image
Sasha Blagojevic • Edited

Wow thanks for suchy a lengthy response and your feedback!

There is a lot of place for improvement, I’m aware of it, I just quickly plastered it all together last night because I had a meeting due this morning and I was getting tired of manually adding up all those download figures lol. It’s work in progress!

I definitely agree with you on the placeholder and pre set default time. I’ll fix it up ASAP.

The chart was initially centered and a lot narrower, it looked a lot prettier too, but when you chose a long custom range all those dates got crammed together and it looked nasty, so I had to go with full width until I have time to properly style it.

If you inspect it you’ll actually see that I used inline CSS euuw, I just wanted to make it presentable in a timely manner xD

I’ll be adding RoR’s Turbolinks for a smoother experience and I had an idea of adding a notification system you could subscribe to, e.g. to get a mail when a cetain package hits a milestone that you chose, like monthly downloads :))

Collapse
 
seankilleen profile image
Sean Killeen

Hey! I've noticed that in this post you use "guys" as a reference to the entire community, which is not made up of only guys but a variety of community members.

I'm running an experiment and hope you'll participate. Would you consider changing "guys" to a more inclusive term? If you're open to that, please let me know when you've changed it and I'll delete this comment.

For more information and some alternate suggestions, see dev.to/seankilleen/a-quick-experim....

Thanks for considering!