This answer is based on a talk a few weeks ago in San Francisco by Isaac Schlueter (npm author, took over node.js responsibilities from Ryan Dahl, works at Joyent - https://twitter.com/izs )
Isaac's main project now is to improve the NPM to help people figure out the quality of packages.
Before efore the npmjs.org website gets smarter, here are factors to consider (some already listed by @3boll )
Factors
- Number of downloads
- How recently updated
- History of updates (has it bin updated often over a long period of time)
- Number of contributors
- Have well-known/trusted developers and maintainers starred it? [a]
- Do other important packages depend on it? [b]
- Is the package well-documented and have it's own website?
- Does the module have test coverage?
Github factors:
updated: As of npm 1.2.20 and forward, modules without repository fields will show a missing repository fields warning. (Nice touch to put a little pressure on people to package up their modules correctly.)
- Number of forks
- Number of commits
- Are issues being closed on github, or have the same issues been open for a long time?
[a] example of starred
https://npmjs.org/~tjholowaychuk
[b] to quickly see from terminal:
npm view <name_of_module> dependencies
example:
npm view connect dependencies
https://npmjs.org/browse/depended
CAVEATS:
Popular doesn't mean being good. There are a lot of modules that are not popular that are really good.
Inaccurate "last updated". NPM may show a the module has been updated 2 years ago, but the github has been updated in last week. This happens if maintainer doesn't update version number as code changes on github.