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

little-durable-objects

v0.1.25

Published

Provider-neutral durable objects for sandbox compute

Readme

little-durable-objects

Named actors with serial method calls and saved state. Requires Node.js 20+.

npm install little-durable-objects

Start with the terminal chat tutorial: two listeners, live messages, and history that survives restarts. It includes complete files and expected output.

Local CLI

Export actors from src/durable-objects.ts. In your project directory:

npx little-durable-objects dev

Wait for Local actors ready at http://127.0.0.1:7100. In another terminal:

npx little-durable-objects run src/chat.ts Alice

Run a second listener in a third terminal:

npx little-durable-objects run src/chat.ts Bob

Once both clients have joined, type a message and press Enter. Both receive it. Reconnect either client to see the saved conversation. The CLI supplies credentials and stores SQLite metadata and snapshots in .little-durable-objects/. State survives restarts; losing that directory loses the actors. Restart dev after actor code changes.

dev --help lists options. token prints a one-hour local credential for tools such as wscat.

These CLI commands require version 0.1.25 or later.

Hosted clients

Set these before the first actor call:

export DURABLE_OBJECT_TOKEN='<session-token>'
export DURABLE_OBJECT_NAMESPACE_ID='my-project'
export DURABLE_OBJECT_CONTROL_PLANE_URL='https://objects.example.com'

Use a session token issued by your trusted backend. Terse supplies these variables to workflows. The SDK connects to the named actor and calls its methods.

See self-hosting for deployment and credentials. Runtime distributions bundle the Go provider.

WebSocket API

The gateway keeps connections while actors hibernate. Each accepted connection receives {"type":"state","state":{...}} automatically.

| API | Behavior | | ------------------------------------ | ---------------------------------------------------- | | Actor.get(id).connect(metadata) | Opens a connection with JSON-serializable metadata. | | onMessage(socket, message) | Handles incoming messages on the actor. | | onDisconnect(socket) | Handles a closed connection. | | this.broadcast(message) | Sends to connected clients. | | socket.send(message) | Sends to one client. | | socket.setTags(...tags) | Tags a connection for filtered broadcasts. | | socket.close() / socket.reject() | Closes a connection / rejects it during onConnect. |

this.connections lists connections during an invocation. From application code, Actor.get(id).broadcast(message) sends transient output without invoking the actor or saving state.

WebSockets use the control-plane URL unless DURABLE_OBJECT_SOCKET_GATEWAY_URL is set.

Reference

License

MIT © 2026 Terse