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

@storylet-studio/play-helpers

v0.11.2

Published

Storylet Engine JS dev-experience layer: the state logger, save-file plumbing, and the in-page property examiner/editor. The runtime stays pure (no DOM, no I/O); everything that touches the host environment lives here.

Downloads

1,472

Readme

@storylet-studio/play-helpers

The host-side helpers for a JavaScript game running @storylet-studio/runtime. The runtime deals cards; nothing in it touches a file, a socket or the DOM. Everything that does lives here, so the runtime stays the pure, corpus-pinned thing every port is transliterated from.

Each helper has a counterpart in the Unity, Godot and Unreal ports under the same name, so an integration reads the same in every engine (scripts/check-runtime-api-parity.mjs holds all four to it).

What is in it

  • The save boundary - saveState / loadState over the parsed file, serializeState / deserializeState over text. Patterplay's pairing, so a project running both engines saves and loads the same way in each. The .storyletsave string form of a whole run: the shared state plus every flow. Your game decides where the bytes go; this decides what they are.
  • The state logger - createStateLogger, snapshotState, diffState. A running account of what the story changed, as it changes, for a debug overlay or a console. createKernelStateLogger is the product-agnostic core if you are mounting your own bags.
  • Live Link - createLiveLink, applyLiveBundle. Joins a running game to Storyletter over a loopback WebSocket, so the editor's Board shows the real run, and a save in the editor swaps the new bundle in underneath it without a restart. Attach the engine, not a flow: the link discovers your flows itself and announces them as they open and close. → Live Link
  • The examiners - createPropertyInspector, createBundleInspector. A DOM panel showing live state, the run log and what a bundle offers. The web equivalent of the Runtime State window each engine port ships.
  • createWorldContainer - a ready-made @world resolver for a game with no state store of its own to bind.

Using it

import { Engine } from "@storylet-studio/runtime";
import { createLiveLink, serializeState } from "@storylet-studio/play-helpers";

const engine = new Engine(bundle, { seed: 7, log: true });
const flow = engine.openFlow("main");

// Debug builds only: inert when no editor is listening, and it never throws
// into your game.
const link = createLiveLink({ build: bundle.content.hash, project: "My Game" });
link.attach(engine);

const saved = serializeState(engine);   // hand the string to your save system

The demo in demo/ wires all of it together against the Hamlet bundle and is the shortest complete example.

→ Full documentation: storylets.dev/play/javascript