你可以使用 npm 搜索栏来查找用于你项目的包。搜索是基于包的标题、描述、readme 和关键词的内容进行的,并由 opensearch 提供支持。搜索结果会根据包的标题、描述、readme 和关键词的匹配情况显示。除了对垃圾包或全新包进行轻微降权以外,不会应用任何主观排序标准,旨在对所有其他包保持中立态度。

🌐 You can use the npm search bar to find packages to use in your projects. The search is performed using content from the package's title, description, readme, and keywords and is powered by opensearch. Search results are displayed based on keyword matching from the package's title, description, readme, and keywords. No subjective ranking criteria are applied, except for a minimal boost to deprioritize spammy or entirely new packages, aiming to maintain a neutral stance towards all other packages.

请注意,新发布的软件包可能需要最多两周时间才会出现在搜索结果中。此外,为了提升用户体验,已弃用的软件包将不显示在搜索结果中。

🌐 Please note that newly published packages may take up to two weeks to appear in the search results. Additionally, deprecated packages are excluded from the search results to enhance the user experience.

搜索包

🌐 Searching for a package

  1. 在搜索栏中输入搜索词并按 回车。当你输入时,可能的选项会出现。

    Screenshot of a search text box with automatic suggestions Screenshot of the search text box and search results
  2. 结果显示了找到的软件包的大致数量,并附带一个用于排序选项的下拉菜单。用户可以通过选择排序方式来优化搜索,例如关键字匹配(默认)、下载次数、使用最多的依赖数量以及最后发布时间。

    Screenshot of the search Sort by dropdown featuring sorting options
  3. 在包搜索结果列表中,单击包的名称。

包出处

🌐 Package provenance

当可用时,软件包主页还会显示来源信息。有关如何验证此信息的详细说明,请查看 查看软件包来源

🌐 The package homepage also displays provenance information when available. For details on how to verify this information, check viewing package provenance.