有什么方法可以找到 npm 包?
下面是根据下面的答案编制的社区维护列表。
npm search <keyword>
npm search works pretty well:
npm search
npm search connect
npm view will show you the timestamp of each version and everthing else from package.json (including node version)
npm view
package.json
npm view connect
There's nipster too, based on npm + github rating.
https://github.com/Enome/node-package-finder (Latest commit 26ff789 on 4 May 2012, should count as dead)
npmsearch sorts the results by a combination of relevance and downloads. The command line version can be installed from npm:
[sudo] npm install -g npmsearch
disclamer: I am the author of npmsearch
node-modules allows you to personalize your results according to the modules that you have starred/followed on github
https://nodejsmodules.org/ is one that lets you search, as well as browse by popularity
For a fast method available in your console, type:
npm search keyword
< Keyword > searches Title, Description, Author and Keywords of all packages.
Libraries.io is great for searching and filtering through NPM modules, you can also filter by license and keyword: https://libraries.io/search?platforms=NPM
I personally use npmsearch.com
I'm not sure how it works internally but it usually gives the best results.
Just in case anyone comes across this question, I also created a tool to help people discover what npm packages other people are using:
http://www.npmdiscover.com
It's sad but npm search won't work for me on node version 6+.
A quick workaround is by doing a curl from the command line:
curl --fail -O https://www.npmjs.com/package/q-promise 2>&1 | grep '404'
If this command returns nothing then the module exist if it does return a 404 the name is available for you to use.
https://npms.io is really nice, provides quality and maintenance stats too
Here's another one: https://npmaddict.com/
Not a search but daily list of New packages with at least 5 GitHub stars
For me the best site for this purpose is Openbase:
https://openbase.com/
By VERY far. It's stats and features are, AFAIK, unmatched by any other site.
According to the NPMS (NPM Search) docs on how to perform a search query, you can use the following operators in the npmjs.com search bar:
scope:types
author:sindresorhus
maintainer:sindresorhus
keywords:gulpplugin
-framework
not:deprecated
not:unstable
not:insecure
is:deprecated
is:unstable
is:insecure
boost-exact:false
score-effect:14
quality-weight:1
popularity-weight:1
maintenance-weight:1
NPM can feel overwhelming because it is the largest package registry! Sometimes, we need less or a more curated suggestions when looking...
This is why I built https://pkg.land
It helps you find similar packages on npm, e.g https://pkg.land/moment will suggest you dayjs, date-fns etc.
dayjs
date-fns
It's still in beta but I do intend to maintain and improve it over time.