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

regex-dungeon

v0.1.2

Published

A zero-dependency terminal roguelike that teaches regex — slay the monsters that must die, spare the rest, with one regular expression per floor.

Readme

🗡️ regex-dungeon

regex-dungeon gameplay

A zero-dependency terminal roguelike that teaches regex. Each floor throws monsters at you — some you must slay, some you must spare — and you fight them with one regular expression. Match the right ones, miss the wrong ones, descend deeper.

🇰🇷 한국어 설명은 아래에 있습니다.

Floor 3/8  Anchors ^ $   ♥♥♥♡♡
  ^ = start, $ = end. Without them, a pattern matches substrings too.

  ▲ SLAY   cat
  ○ SPARE  category
  ○ SPARE  scatter
  ○ SPARE  tomcat

  your pattern ▶ ^cat$

  ▲ cat        ✓ slain
  ○ category   ✓ spared
  ○ scatter    ✓ spared
  ○ tomcat     ✓ spared
  Floor cleared!  +110

One file, zero dependencies, runs with one command. Auto-detects your language (English / 한국어).

Play

Requires Node.js ≥ 16. No install needed:

npx regex-dungeon

Or clone and run:

git clone https://github.com/Haneul-two/regex-dungeon.git
cd regex-dungeon
node index.js

How it works

  • Each floor teaches one regex concept (literals → ./classes → anchors → quantifiers → optionals → \d{n} → groups/| → a boss email).
  • You type a single pattern. The game tests it against every monster:
    • ▲ SLAY monsters must match.
    • ○ SPARE monsters must not match.
  • Get it perfect → floor cleared. Any mistake → lose a heart (♥). Run out → you die.
  • Shorter patterns score higher (beat par), fewer attempts score higher.
  • Stuck? Type ? for a hint, or ?? to reveal the answer (that floor scores 0).
regex-dungeon --lang ko     # force Korean (or set BEAR_LANG=ko)
regex-dungeon --selftest    # verify every floor is solvable
regex-dungeon --help

Contributing floors

Floors live in the FLOORS array in index.js. A floor is just data:

{
  concept: { en: 'Quantifier +', ko: '수량자 +' },
  lesson:  { en: '`+` means "one or more"...', ko: '`+` 는 "1개 이상"...' },
  slay:    ['go', 'goo', 'goooo'],   // MUST match
  spare:   ['g', 'ga', 'good'],      // must NOT match
  par:     6,                        // target pattern length
  solution:'^go+$'                   // used by --selftest and the ?? reveal
}

PRs with new floors are very welcome — run npm test (it's --selftest) to confirm your floor is solvable by its own solution, then open a PR.

License

MIT


🇰🇷 한국어

의존성 없는 터미널 로그라이크로 정규식을 배우는 게임. 각 층마다 몬스터가 나오는데, 어떤 놈은 반드시 처치하고 어떤 놈은 반드시 살려둬야 합니다. 무기는 정규식 하나. 맞춰야 할 놈만 매치하고 엉뚱한 놈은 피하면서 던전을 내려가세요. 단일 파일, 의존성 0, 명령어 한 줄. 언어는 자동 감지(영어 / 한국어)됩니다.

3/8 층  앵커 ^ $   ♥♥♥♡♡
  ^ 시작, $ 끝. 없으면 부분 문자열도 매치돼 버립니다.

  ▲ 처치   cat
  ○ 회피   category
  ○ 회피   scatter
  ○ 회피   tomcat

  네 패턴 ▶ ^cat$
  ...
  층 클리어!  +110

플레이

Node.js ≥ 16 필요. 설치 없이 실행:

npx regex-dungeon

규칙

  • 각 층은 정규식 개념 1개를 가르칩니다 (리터럴 → ./문자클래스 → 앵커 → 수량자 → 선택 → \d{n} → 그룹/| → 보스 이메일).
  • 패턴 하나를 입력하면 모든 몬스터에 대해 테스트합니다.
    • ▲ 처치 몬스터는 반드시 매치돼야 함.
    • ○ 회피 몬스터는 절대 매치되면 안 됨.
  • 완벽하면 층 클리어. 실수하면 하트(♥) 감소. 다 잃으면 사망.
  • 패턴이 짧을수록, 시도가 적을수록 점수가 높습니다.
  • 막히면 ? 로 힌트, ?? 로 정답 공개(해당 층 0점).
regex-dungeon --lang ko     # 한국어 강제 (또는 BEAR_LANG=ko)
regex-dungeon --selftest    # 모든 층이 풀리는지 검증

층 기여하기

층은 index.jsFLOORS 배열에 데이터로 들어 있습니다. 새 층 PR을 환영합니다 — npm test(=--selftest)로 본인 층이 solution 으로 풀리는지 확인 후 PR 해주세요.

License

MIT