Menu

1 / 4

I Installed 8 Everyday npm Packages. 384 Arrived. Node Has a Built-in for Each.

JavaScript in Plain English - Medium·Ferid Brković·19 days ago
#S7Te1WtA
Reading 0:00
15s threshold

Member-only story

I Installed 8 Everyday npm Packages. 384 Arrived. Node Has a Built-in for Each.

Tests, watch mode, .env files, CLI flags, colours, globs, HTTP and TypeScript, redone with zero installs. Plus where the package still wins.

Ferid Brković

8 min read10 hours ago

Press enter or click to view image in full size

I made an empty folder and installed eight packages that sit in a lot of Node projects: jest, nodemon, dotenv, yargs, chalk, glob, node-fetch and tsx. npm reported added 384 packages . The node_modules folder weighed 100.6 MB before I had written a line of code.

Then I did each of those eight jobs again with nothing installed at all, using only what ships inside Node.

Below are all eight built-ins with the code that ran and the output it printed, the version where each one arrived, and the cases where the package is still the better choice.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.