This tutorial explains how to find download size of any package from NPM registry. BundlePhobia is a free and open source online tool which takes the name of an NPM package from you and then helps you see its size. You can see the size of the package in compressed and uncompressed form. Also, it shows the composition of the package and the amount of time it will take to download it. The website is very simple and supports autocomplete feature. Not only this, but you can upload a Package.json file here as well to analyze the packages.
There is a very long list of packages in NPM registry that you can use in you projects. Each package is responsible for different task and there are many packages which are meant for doing same thing. But if you want to compare their import cost then the online tool I have mentioned here will help you. It just takes the package name and show you some useful stats about that. You can see its download size compare that with the sizes of older versions.
How to find Download size of any Package in NPM Registry?
There is no sign up is required to use this online tool. You just have to go to the homepage of the website and then start entering the package name. It supports auto suggest feature so the package yo type will be visible as soon as you start typing it.
Now, hit the enter key and it will show all the details it has on that package. Alternatively, you can upload a package.json file there to analyze the packages from it. However, this feature is currently in beta stage and may be in later updates it will be a stable feature. On the results page, it shows you details about the package like its download size, compressed size, its versions, and some other optional details. You can analyze the package and then do whatever you like.
This way, you can use this simple website to find import code of a package from NPM registry. All you have to do is just enter the name of the package and see its download side and other details. The too is open source and that is why you can run it locally as well. This is quite advantageous as if in future the main website goes down you can use its source code to run it locally or on your own server.
- NPM Manager for Windows to Install, Uninstall, Update NPM Packages
- Get Email Alerts for New Releases from GitHub, GitLab, PYPI, NPM
BundlePhobia is a very useful tool for Node.js programmers to quickly calculate import cost of any package from NPM registry. The tool is very simple and you can use it very easily to see download size and some other useful parameters of package. And I liked the then scanning package.json file feature to analyze package directly from a project file. So, if you are a Node.js developer or programmer then you will like this simple tool.