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

@txco/op

v0.1.0

Published

Author sandboxed txco nano-ops: import { op } from "@txco/op".

Readme

@txco/op

Author sandboxed txco nano-ops — small functions a resonator invokes with EXEC "op://<name>", run in-process on a WASI sandbox (no filesystem, network, or ambient env).

import { op } from "@txco/op";

export default op(async ({ input, env, log, emit, meta }) => {
  log.info("classifying", meta.op);
  emit("classified", { tier: "vip" });
  return { classification: "vip", summary: input.email?.draft?.summary };
});

A compute is a <name>.js (or .ts) sitting next to its resonator at OPS/<stack>/<scope>/<name>.txcl. Build, run, and test it with the CLI:

txco op init  OPS/site/100/classify      # scaffold classify.js (+ classify.txcl)
txco op build OPS/site/100/classify.js   # → classify.wasm + compute://sha256/…
txco op run   classify.wasm --input '{"name":"Matt"}'
txco op test  OPS/site/100/classify.txcl # runs against the scope's mock-request.json

txco apply / txco dev discover the colocated source automatically, build it, and upload the content-addressed module — no manifest, no node_modules.

The handler context

op(handler) receives one ctx:

| field | what it is | | ---------- | --------------------------------------------------------------------- | | input | the selected request envelope (the op's input) | | meta | trace identity: { rid, op, stack, scope, name } | | env | the op's non-secret config — the resonator's WITH-clause channel | | secrets | per-op materialized secrets by name (ctx.secrets.STRIPE_API_KEY) | | log | structured logging (log.info/warn/error/debug) → chassis log | | emit | emit(event, data?) — an optional named event |

The handler returns the output envelope (sync or async). stdout is just that envelope; log/emit go to the chassis log, so they never corrupt the result.

ctx.secrets carries the same per-op secrets the chassis would splice into an http:// worker's request — declared in the resonator's WITH secrets: block, materialized from the secret store, and handed to the compute by name. They are cleartext: returning a secret in the output envelope will log/trace it.

fetch and kv are not in this version — they arrive with the host capability model.

Helper subpaths

import { get, set, pick } from "@txco/op/envelope"; // nested path read/write
import { z } from "@txco/op/schema";                // tiny runtime validator
import { b64, sha256, hmac } from "@txco/op/crypto"; // pure-JS crypto
import { json, text } from "@txco/op/codec";         // encode/decode

Only what you import is bundled — unused helpers are tree-shaken away.

TypeScript

.ts is first-class (esbuild transpiles it during the build). op<Input>(…) takes an input type parameter for a typed ctx.input.

How it builds

esbuild bundles your entry (resolving @txco/op from this package, transpiling TS, tree-shaking) → javy compiles the bundle to a WASI module with its event loop enabled (so async/await work). The result is content-addressed and runs on the same wazero engine locally (txco op run/test) and in the chassis — so "works locally" means "works in production".