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

tart-stepping-sandbox

v0.1.0

Published

Sandbox for tart-stepping

Downloads

9

Readme

tart-stepping-sandbox

Stability: 1 - Experimental

NPM version

Remotely controlled sandbox for controlling tart-stepping.

Overview

Remotely controlled sandbox for controlling tart-stepping. Familiarity with tart-stepping is assumed.

Usage

To run the below example run:

npm run readme
"use strict";

var sandbox = require('../index.js');
var tart = require('tart');

var sponsor = tart.minimal();

var create = sponsor(sandbox.createBeh);

var transport = sponsor(function transportBeh(message) {
    console.dir(message);
});

var ok = sponsor(function okBeh(message) {
    console.dir(message);
});

var fail = sponsor(function failBeh(message) {
    console.dir(message);
});

create({fail: fail, ok: ok, transport: transport});

Tests

npm test

Documentation

Public API

sandbox.createBeh

Actor behavior that will create a new tart-stepping configuration and respond with capabilities allowing for remote control of that configuration.

Message format:

  • fail: Actor function (error) {} Fail actor to respond to if errors occur when creating.
  • ok: Actor function (sandboxCapabilities) {} Ok actor to respond to with created capabilities.
  • transport: Actor function (message) {} Transport actor capability that will be used for outbound traffic from the created sandbox.

The behavior creates two domains. The controlDomain, is the control surface for the tart-stepping configuration. The other created domain (domain) is the actual tart-stepping configuration which will accept commands from the controlDomain to dispatch, run the event loop, inspect last effect, destroy the configuration, or sponsor new actor behaviors.

sandbox.createBeh will return a response object to ok actor that contains the following:

  • controlDomain: String String name for the created control domain.
  • controlReceptionist: Actor function (message) {} Receptionist actor for the control domain to be registered with a transport for the given controlDomain name.
  • destroy: URI URI of the capability to destroy the created configuration.
  • dispatch: URI URI of the capability to dispatch the next event.
  • domain: String String name for the created domain to be controlled.
  • effect: URI URI of the capability to inspect the currently queued effects for the configuration.
  • eventLoop: URI URI of the capability to invoke the event loop on controlled configuration.
  • receptionist: Actor function (message) {} Receptionist actor for the domain under control to be registered with a transport for the given domain.
  • sponsor: URI URI of the capability to sponsor actor behaviors within the domain under control.

sandboxCapabilities.destroy

Destroys the sandboxed configuration.

Message format:

  • ok: Actor Optional actor to ack after destruction is complete.

sandboxCapabilities.dispatch

Dispatch the next event. This is a wrapper around stepping.dispatch() using tart-adapter message format.

sandboxCapabilities.effect

Return the value of stepping.effect (see tart-stepping).

Message format:

  • ok: Actor Actor to receive value of stepping.effect.

sandboxCapabilities.eventLoop

Dispatch events in a manner provided by control. This is a wrapper around stepping.eventLoop([control]) using tart-adapter message format.

sandboxCapabilities.sponsor

Given a Node.js module that exports behaviors (see tart-vm), sponsor an actor for each behavior exported from the module.

Message format:

  • fail: Actor function (error) {} Fail actor to respond to if errors occur.
  • module: String Node.js module that exports behaviors that should be sponsored. The resulting actors will be sent to ok actor as a map of name-capability URI pairs, or a single capability URI.
  • ok: Actor function (response) {} Ok actor to respond to with sponsored capability URIs.

Sources