In a previous blog post, I explained how to start with creating an npm package I decided to go with a real-world example and created a tracking number validation.
As a developer working in an eCommerce startup (shelfmint) the pain was recognized and the solution was known.
The package I created was very simple but it worked as expected.
After a couple of months, while uploading the new package to my npm account, I noticed a package with a very high amount of downloads. due to the npm design, you can see only downloads of a given month and not the total downloads, to do that, you need to use an external tool such as npm-stats.
So letโs think of what and why the package got this traffic of downloads, and I even have a confirmation that is used in a production environment.
Letโs start with the traffic the package got, a very big percentage of that traffic, in my opinion, came from the name of the package, tracking-number-validation the name gives you all the information you need to understand exactly what the package does, and if you need to validate tracking number with JavaScript the package will be one of the first options you get in Google, npm, and GitHub. Pretty cool that with a very little amount of effort the package is out there and it is very noticeable for a person who needs to address the pain of validating tracking numbers, so I think we pretty much understand why we have traffic.
Now to the downloads and the use, as expected when choosing a real pain, there are a lot of people with the same issue that will love to get a simple solution, ready-made especially for this, although the package was just a demonstration, it did work and validate tracking numbers.
After the excitement from the first version, I released a new version with improved API and test coverage.
Check it out here ๐
Originally published at niradler.com on November 3, 2018.