These are my rules of thumb: look at the package's stats (e.g.
https://www.npmjs.com/package/jquery), more downloads it has, the better; open the package's git repository, see is the package actively maintained, look at the number of stars and watchers. Take a look at the package source code, code quality, availability of tests, etc. Using these criteria I narrow it down, and then if necessary I try to remaining packages and see which one fits better.