node.js - How do I choose a node module? -


there dozens of modules available out there, many fulfilling same task. instance, the list of router modules alone contains 26 modules.

given list of modules, how can pick best needs? looking 1 maintained, tested, , inertia, i'm not sure how figure out of these modules fit criteria.

this answer based on talk few weeks ago in san francisco isaac schlueter (npm author, took on node.js responsibilities ryan dahl, works @ joyent - https://twitter.com/izs )

isaac's main project improve npm people figure out quality of packages.

before efore npmjs.org website gets smarter, here factors consider (some listed @3boll )

factors

  1. number of downloads
  2. how updated
  3. history of updates (has bin updated on long period of time)
  4. number of contributors
  5. have well-known/trusted developers , maintainers starred it? [a]
  6. do other important packages depend on it? [b]
  7. is package well-documented , have it's own website?
  8. does module have test coverage?

github factors: updated: of npm 1.2.20 , forward, modules without repository fields show missing repository fields warning. (nice touch put little pressure on people package modules correctly.)

  1. number of forks
  2. number of commits
  3. are issues being closed on github, or have same issues been open long time?

[a] example of starred

https://npmjs.org/~tjholowaychuk

[b] see 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 lot of modules not popular good.

inaccurate "last updated". npm may show module has been updated 2 years ago, github has been updated in last week. happens if maintainer doesn't update version number code changes on github.


Comments