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

@gizmo564/pass-the-phone

v0.1.2

Published

One-device handover: key-based cover gate (PassGate + pass-gate-state), re-cover on hidden tab or idle, and a PassCover screen. Logic adopted from the former game-kit/pass-the-phone (removed).

Readme

Pass the phone

One device, everyone takes turns. The whole job is: never show a player's private information until that player has the phone and says so. This is how Track Record and Sandwich Slam do it, written down so the next game matches. Two safeguards (re-cover when the tab is hidden, and after idle) are new in the kit and not yet in those two games.

The flow

  1. A turn ends. The game moves to the next player.
  2. The screen shows a cover: the next player's avatar and name, "Pass the phone to ___", anything they should know (what happened since their last turn), and one big button: "I'm ready" / "I'm Ann: show my hand".
  3. Only that tap reveals the private screen (the hand, or starts the hidden clip). The tap is also where you unlock audio (browsers only allow sound after a tap) and start anything that must begin when the player is looking.
  4. The private screen is shown until the move is made. Then the reveal/result screen is public (everyone is looking), then back to step 1.

The rules

  • The cover is keyed to the turn, not to a flag that someone remembers to reset. Each turn has a key (turn number + player). The cover is up whenever the key the player confirmed differs from the current turn's key. A forgotten reset can then only ever show the cover too often, never too rarely.
  • Reloading must not leak. Save the confirmed key together with the game. A reload mid-handover comes back to the cover; a reload mid-turn comes back to the same private screen.
  • Public phases are not covered. Reveals, scores and "since your last turn" are for the whole table. Cover only phases that show secrets.
  • Re-cover when the phone is put down. Hide the private screen if the tab becomes hidden (screen lock, app switch) or after a stretch with no touches (default 90 s). PassGate does both.
  • Say what happened. The next player was not looking. Show a short "since your last turn" list on the cover.
  • Names, not "player 2". The cover is the one screen everyone reads aloud, so it must be unmistakable who is next.
  • Menu on the cover. Leaving the game, rules and the table view must be reachable without revealing anything.
  • No hidden information in the cover. It may show public facts (token count, timeline length) but never a hand.
  • Automatic players (bots) skip the cover but their move should still be shown to the next human on their cover.

Files

| File | Use | | --- | --- | | web/pass-gate-state.ts (+ test) | The logic: key-based cover, confirm, re-cover. No UI. | | web/PassGate.tsx (+ test) | A wrapper component using that logic, with the hidden-tab and idle re-cover. | | web/PassCover.tsx | A ready-made cover screen: avatar, "Pass the phone to ___", since-your-last-turn list, big button, menu slot. |

How the two games differ (so you can pick)

  • Track Record hides a song: the cover starts the clip when tapped (onReady unlocks audio and plays). The confirmed key is saved with the game in localStorage, so Resume game lands on the right screen.
  • Sandwich Slam hides a hand: the cover lists the last moves and the reveal tap shows the hand. Bots skip it.

Test checklist

  1. Start a 3-player game: after each move the next player sees only the cover.
  2. Reload on the cover and on the private screen: same screen, nothing leaked.
  3. Lock the phone on the private screen and unlock: cover is back.
  4. Leave the phone idle past the timeout: cover is back.
  5. With a bot next: no cover for it, and the human after it sees what the bot did.