Linux command
npm-search 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Search for packages
npm search [query]
Search with multiple terms
npm search [react] [router]
Output as JSON
npm search --json [query]
Limit results
npm search --searchlimit=[20] [query]
Long format output
npm search --long [query]
说明
npm search searches the npm registry for packages matching the given terms. It searches package names, descriptions, and keywords. Results include package name, description, author, date, version, and keywords.
参数
- --json
- JSON output.
- --long
- Extended information.
- --searchlimit _n_
- Limit results.
- --searchopts _opts_
- Search options.
- --searchexclude _terms_
- Exclude terms.
- --registry _url_
- Search specific registry.
FAQ
What is the npm-search command used for?
npm search searches the npm registry for packages matching the given terms. It searches package names, descriptions, and keywords. Results include package name, description, author, date, version, and keywords.
How do I run a basic npm-search example?
Run `npm search [query]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --json do in npm-search?
JSON output.