【问题标题】:How to find search/find npm packages如何查找搜索/查找 npm 包
【发布时间】:2012-05-21 01:30:19
【问题描述】:

【问题讨论】:

  • 老实说,在这三个之间,我不知道您是如何找不到节点包的。哈哈,你是在寻找特别的东西却没有找到吗?
  • @kristian 这个列表很不错。但我想知道是否还有更多(越多越好……):P.
  • @Kristian 例如仅搜索特定版本的节点或日期,因为我不喜欢旧的/未维护的包等。
  • 也许将每个项目作为单独的答案是一个好主意,这样人们就可以投票,从而获得众包排名。
  • 关于 npm 官方问题跟踪器的讨论,请参阅github.com/npm/npm/issues/11519

标签: node.js npm


【解决方案1】:

NPM 可能会让人感到不知所措,因为它是 最大的 包注册表!有时,我们在寻找时需要更少或更多精心策划的建议......

试试https://pkg.land!它可以帮助你在 npm 上找到类似的包,例如 https://pkg.land/package/moment 会建议你 dayjsdate-fns 等。

这是我在假期里尝试过的一个项目,并打算随着时间的推移进行维护和改进。

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
【解决方案2】:

根据 NPMS (NPM Search) 文档关于如何perform a search query,您可以在 npmjs.com 搜索栏中使用以下运算符:

Search Syntax Description
scope:types Show/filter results that belong to the @types scope
author:sindresorhus Show/filter results in which sindresorhus is the author
maintainer:sindresorhus Show/filter results in which sindresorhus is qualifier as a maintainer
keywords:gulpplugin Show/filter results that have gulpplugin in the keywords (separate multiple keywords with commas, you may also exclude keywords e.g. -framework)
not:deprecated Exclude deprecated packages from the results
not:unstable Exclude packages whose version is < 1.0.0
not:insecure Exclude packages that are insecure or have vulnerable dependencies (as per nsp)
is:deprecated Show/filter is deprecated packages
is:unstable Show/filter packages whose version is < 1.0.0
is:insecure Show/filter packages that are insecure or have vulnerable dependencies (as per nsp)
boost-exact:false Do not boost exact matches, defaults to true
score-effect:14 Set the effect that package scores have for the final search score, defaults to 15.3
quality-weight:1 Set the weight that quality has for the each package score, defaults to 1.95
popularity-weight:1 Set the weight that popularity has for the each package score, defaults to 3.3
maintenance-weight:1 Set the weight that the quality has for the each package score, defaults to 2.05

进一步阅读

【讨论】:

    【解决方案3】:

    对我来说,用于此目的的最佳站点是 Openbase:

    https://openbase.com/

    非常远。 AFAIK 的统计数据和功能是任何其他网站都无法比拟的。

    【讨论】:

      【解决方案4】:

      这是另一个:https://npmaddict.com/

      不是搜索,而是每日至少有 5 个 GitHub 星的新包列表

      【讨论】:

        【解决方案5】:

        https://npms.io 非常好,也提供质量和维护统计数据

        【讨论】:

          【解决方案6】:

          https://github.com/Enome/node-package-finder(2012 年 5 月 4 日的最新提交 26ff789,应该算作死亡)

          【讨论】:

            【解决方案7】:

            很遗憾,但 npm search 在节点版本 6+ 上对我不起作用。

            快速的解决方法是从命令行执行 curl:

            curl --fail -O https://www.npmjs.com/package/q-promise 2>&1 | grep '404'
            

            如果此命令不返回任何内容,则模块存在,如果返回 404,则名称可供您使用。

            【讨论】:

              【解决方案8】:

              以防万一有人遇到这个问题,我还创建了一个工具来帮助人们发现其他人正在使用的 npm 包:

              http://www.npmdiscover.com

              【讨论】:

                【解决方案9】:

                我个人使用npmsearch.com

                我不确定它在内部是如何工作的,但它通常会产生最好的结果。

                【讨论】:

                  【解决方案10】:

                  Libraries.io 非常适合通过 NPM 模块进行搜索和过滤,您也可以按许可证和关键字进行过滤:https://libraries.io/search?platforms=NPM

                  【讨论】:

                  • 这是一个很棒的工具,但存在不存在的软件包版本等问题GitHub Issue
                  【解决方案11】:

                  对于控制台中可用的快速方法,请键入:

                  npm search keyword

                  搜索所有包的标题、描述、作者和关键字

                  【讨论】:

                  • npm searchnpm view 有什么区别
                  【解决方案12】:

                  npmsearch 根据相关性和下载量对结果进行排序。命令行版本可以从 npm 安装:

                  [sudo] npm install -g npmsearch
                  

                  免责声明:我是 npmsearch 的作者


                  node-modules 允许您根据您在 github 上加星标/关注的模块个性化您的结果

                  【讨论】:

                  • 演示链接已失效。我已更新您的答案以表明这一点,以便于浏览。
                  【解决方案13】:

                  https://nodejsmodules.org/ 是一种让您搜索和按人气浏览的工具

                  【讨论】:

                  • Nodetoolbox 现在已经死了。用这个更新了你的答案。
                  【解决方案14】:

                  还有nipster,基于 npm + github 评级。

                  【讨论】:

                  • 其实拼写是“nipstr”,今天从google得知“nipster”是纳粹潮人
                  • Github 仓库 URL 已更改为 Nipster,作者已将代码部署到 nipstr.com,但看起来已经过时了。
                  【解决方案15】:

                  npm search 效果很好:

                  npm search connect

                  npm view 将显示每个版本的时间戳以及来自package.json 的所有其他内容(包括节点版本)

                  npm view connect

                  【讨论】:

                    猜你喜欢
                    • 2017-07-30
                    • 2020-11-20
                    • 1970-01-01
                    • 2020-08-14
                    • 1970-01-01
                    • 1970-01-01
                    • 1970-01-01
                    • 1970-01-01
                    • 1970-01-01
                    相关资源
                    最近更新 更多