npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-slash-match

v0.1.0

Published

为斜杠菜单提供模糊匹配:不用从首字母输入,记得名称中段/后缀也能搜到(如 /me 命中 grill-me);运行时接管官方搜索函数,不改官方代码。

Readme

dsh-slash-match

让斜杠菜单(slash menu)支持模糊匹配:不用从首字母开始输入,记得名称中间/后半段也能搜到。

  • 输入 /me → 能命中 grill-meloop-memigrate-to-shoehorn
  • 输入 /g → 前缀命中的 grill-megrilling 依然排在最前面(和前缀匹配共存,不会重复)
  • 空查询、无匹配、点击、回车执行等行为与官方完全一致

说明:斜杠菜单主要有「命令」和「skill」两个分组。官方「命令」分组的搜索本来就是模糊的;本插件把「skill」分组也升级成同一套模糊算法,让整个菜单行为一致。

原理(不改官方代码)

官方 skill 分组的搜索函数只做 name.startsWith(query)(前缀匹配)。本插件在运行时接管这一个函数:先让官方实现以空查询返回完整目录,再用与官方「命令」分组同一套模糊打分算法(子序列对齐 + 边界/相邻加分 + 前缀优先)过滤排序。菜单外观、分组标题、onPick、回车执行链路全部保持官方原样。

安装

dsh plugin --profile web add dsh-slash-match

或在 profile 的 package.json 加入依赖与 dsh.profile.bundles,然后重启 dsh web

卸载

从 profile 的 dsh.profile.bundles 移除本插件并删除依赖,重启 dsh web 即完全恢复官方行为(内存中的接管随插件卸载/刷新自动失效)。

边界

  • 依赖官方插件的运行时实例(inputTriggers 服务);官方升级若改动内部结构,本插件可能失效——届时卸载即可,不影响产品。
  • 本地增强,不是上游修复;官方正路是给 packages/client/ui-skill 提交 PR。

License

MIT