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

@tablefolk/menus

v0.1.0

Published

JRPG-style menus: click, press a number, type or say a choice; words matched by number, label, keywords, meaning (embeddings) or a language model.

Readme

@tablefolk/menus

JRPG-style menus for games and apps. The player clicks a choice, presses its number, uses the arrows and Enter, or types or says what they want.

Words are matched to a choice cheapest first:

  1. a number ("2", "the second one", "the last");
  2. the label or a keyword;
  3. shared words;
  4. meaning, through an embedding model you give it;
  5. a language model you give it, picking a number.

Any step can answer "none of these".

import { match, modelChooser, createMenuBox } from '@tablefolk/menus';
const menu = { title: 'Brakka', text: 'What do you need?', other: true,
  items: [{ id: 'buy', label: 'Buy a sword' }, { id: 'fix', label: 'Repair my armour', keywords: ['mend'] }, { id: 'bye', label: 'Leave' }] };

await match(menu, 'can you mend it')     // { item: {id:'fix',...}, by: 'keyword', score: 1 }
// close between a few choices by meaning, with no model to decide: { none: true, by: 'unsure', unsure: [items] }
// (the box then asks "did you mean 1. ... or 2. ...?")

const box = createMenuBox({
  matchOptions: () => ({ choose: modelChooser((messages, o) => brain.chat(messages, o)) }),   // optional
  onChoose: (item, { how, text }) => console.log(item.id, how),
  onOther: text => console.log('none fit:', text),
});
await box.open(menu);          // { item, how, text } | { other: true, text } | null
box.offer(speechText);         // words from your own text field or speech input

It needs no models of its own. Give it embed(query, texts) (similarities) and choose (any chat model: modelChooser, or @tablefolk/brain's pick). The box brings a default look (.menu-box); styles: false leaves the look to you.

Part of Tablefolk (libs/). MIT.