macOS ◆ xterm-256color ◆ zsh 1325 views

I was looking to use a node equivalent to the fetch (window.fetch) API for use in node and had settled on the node-fetch package. I realized that I could probably use something slimmer, so I started looking around.

For alternatives, I looked at node-fetch, got, and my personal favorite, axios. Bundlephobia.com lists sizes, but only gzipped or min+gzip (aka for network download impact), but I was more concerned about file system impact; for node dependencies while being included for a serverless function. File size is somewhat nebulous based on differences between OS, npm version, and with other considerations; so it’s no wonder it’s not easy to just show and have a value.

My test shown above was run with Node LTS (8.9.x) and npm (5.6.x) on macOS High Sierra (10.13.1).

Other great online comparison tools, neither of which showed some of the other considerations for comparing node packages: