If you’ve spent any time in the Node or front-end JavaScript world, you are probably familiar with NPM and know there are hundreds of thousands of modules to choose from.

_“Analysis paralysis describes an individual or group process when overanalyzing or overthinking a situation can cause forward motion or decision-making to become “paralyzed”, meaning that no solution or course of action is decided upon.” — _Wikipedia


NPM (Node Package Manager)

NPM is the world’s largest software registry, with more than 1 million packages. It makes it easy for JavaScript developers to share the code that they’ve created to solve particular problems and for other developers to reuse that code in their own applications.

Once you depend on this code from other developers, NPM makes it easy to check if any updates were made and to download those updates when they happen.

These bits of reusable code are called packages or sometimes modules. A package is just a directory with one or more files in it that also has a file called package.JSON with some metadata about this package.


Project Dependencies

A typical application such as a website will depend on dozens or hundreds of packages. These packages are often small, and the general idea is you create a small building block that solves one problem and solves it well.

This makes it possible for you to compose larger custom solutions out of these small shared building blocks. There are lots of benefits to this. It makes it possible for your team to draw on expertise from outside of your organization by bringing in packages from people who have focused on particular problem areas.

You can find packages by browsing the NPM website. There, you’ll find different kinds of packages: Node modules that can be used on the server side, packages that add commands for the command line, and others can be used in the browser on the front end.


When Should I Use One?

Let’s say you’re developing the “next great application.” You run into a problem and decide you do not want or do not know how to write a particular feature.

One of the main reasons you’d want to install a package is to use pre-existing code. There’s no need to reinvent the wheel or do a lot of difficult time-consuming programming when you can download standalone tools you can use right away in your application

#open-source #npm #javascript #software-engineering #programming

How to Choose the Right NPM Package for Your Project
2.30 GEEK