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

dragon-spin

v0.1.1

Published

Dragon Spin slot machine CLI game

Readme

Dragon Spin CLI

A terminal-based recreation of the Dragon Spin slot machine.

╔══════════════════════════════════════╗
║         D R A G O N   S P I N       ║
║            ~ CLI Edition ~           ║
╚══════════════════════════════════════╝

Quick Start

Play instantly (once published to npm)

npx dragon-spin

That's it. No install, no build — npx downloads the package and runs it.

Play from source

git clone <repo-url>
cd dragon-spin
npm install
npm run build
npm start

Test npx locally (before publishing)

npm install
npm run build
npm link
npx dragon-spin

Publish to npm

npm login
npm publish

The prepublishOnly script auto-compiles TypeScript before publishing. The files field ensures only the compiled dist/ is shipped — no source code, no node_modules.

How to Play

Starting a Game

When you launch, you'll be prompted to start a New Game or Continue a saved session.

New Game walks you through setup:

  1. Pick your starting credits (100 / 500 / 1,000 / 5,000)
  2. Pick how many paylines to play (1–30)
  3. Pick your bet per line (1 / 2 / 5 / 10 / 25)

Continue loads your last session from ~/.dragon-spin/save.json. The game auto-saves after every spin.

Controls

| Key | Action | |-----|--------| | Space or Enter | Spin the reels | | / | Increase / decrease bet per line | | / | Decrease / increase number of active paylines | | Q | Quit (game is auto-saved) |

Reading the Display

┌────────┬────────┬────────┬────────┬────────┐
│   🔴   │   K    │   💚   │   A    │   🟢   │
├────────┼────────┼────────┼────────┼────────┤
│   🐲   │   Q    │   🔵   │   10   │   🔴   │
├────────┼────────┼────────┼────────┼────────┤
│   A    │   🟣   │   J    │   K    │   Q    │
└────────┴────────┴────────┴────────┴────────┘
  • 🐲 Wild — Substitutes for all symbols except Bonus
  • 🔴 🔵 🟣 🟢 Dragons — Red, Blue, Purple, Green (highest value)
  • A K Q J 10 Cards — Ace, King, Queen, Jack, Ten (lower value)
  • 💚 Bonus — Green emerald scatter (appears on reels 2, 3, 4 only)
  • 🫧 Mystery — Pearl (resolves to a random symbol when the reels spin)

The HUD below the grid shows your current credits, bet per line, active lines, total bet, and last win.

Winning

Wins pay left to right on active paylines. You need 3 or more matching symbols in a row starting from the leftmost reel. Wild counts as any symbol.

Only the highest win per payline is paid. After a spin, winning lines flash to show you what hit.

Mystery Stacked Reels

Each reel has hidden "mystery" positions. When you spin, all mystery positions on a single reel transform into the same randomly chosen symbol. This can create big stacked wins when multiple reels reveal the same symbol.

Dragon Spin Bonus

Land 3 BNS symbols on reels 2, 3, and 4 to trigger the Dragon Spin Bonus. A wheel spins to select one of three free game modes:

Raining Wilds (5 free spins)

3–10 Wild symbols randomly drop onto the reels before each spin. More wilds = more chances for big wins.

Persisting Wilds (5 free spins)

Wild symbols that appear get locked in place for the remaining free spins. By the final spin, the reels can be loaded with wilds.

Reel Blast (5 free spins)

Play on 3 reel sets simultaneously, all sharing the same center reels (2, 3, 4). Three sets of wins evaluated per spin.

Paytable

Payouts are multiplied by your bet per line:

| Symbol | 5x | 4x | 3x | |--------|---:|---:|---:| | Wild | 50 | 20 | 5 | | Red Dragon | 50 | 20 | 5 | | Blue Dragon | 50 | 20 | 5 | | Purple Dragon | 50 | 20 | 5 | | Green Dragon | 50 | 20 | 5 | | Ace | 30 | 10 | 5 | | King | 20 | 10 | 2 | | Queen | 20 | 10 | 2 | | Jack | 20 | 10 | 2 | | Ten | 20 | 10 | 2 |

Scatter: 3 Bonus symbols pay 30x your total bet (in addition to any line wins).

Save Data

Your game is saved automatically to ~/.dragon-spin/save.json after every spin. This includes:

  • Credit balance and bet settings
  • Spin history (last 500 spins)
  • Session stats (total spins, total wagered, total won, biggest win)

Delete ~/.dragon-spin/save.json to reset.

Development

npm install        # Install dependencies
npm run build      # Compile TypeScript to dist/
npm start          # Run the game
npm run dev        # Build + run in one step

Zero runtime dependencies. Only typescript and @types/node as dev dependencies.