Choosing the right npm package.

Prachi jagtap
2 min readMar 22, 2021

The way we include libraries in the c# and c++ projects we can include npm packages in any js project.
NPM is the world’s largest software registry, with more than 1 million packages.

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.

To find a package you can go to the npm website the npm website will provide some statistics about the package including the number of downloads,
number of depending packages, and more to assist developers in judging the quality of packages.

Before choosing and using a package, you might want to consider the
following parameters :-

  • Popularity: Popularity indicates how many times the package has been downloaded and how many other projects depend on it.
    This is a strong indicator of packages that were found to be
    useful by others.
  • Contributors: Check out the number of contributors to each project. More eyes looking over code can only be a good thing.
  • Maintenance: More frequently maintained packages are more likely to have fewer bugs and be more stable. In addition, frequent updates are an indication of resolved issues and maybe new feature releases.
  • Size: The size of a package increases with the amount of its code and the dependencies it uses. A large package size can affect your application and its performance.
  • Well documented: A well document package will save you significant amount of time spent on figuring out how to use the package efficiently.

--

--

Prachi jagtap

A software engineer | Full stack developer | AWS certified | Food blogger | Poet