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

@c9up/comet

v0.1.4

Published

Comet — agnostic JSON-RPC 2.0 protocol + isomorphic, transport-injectable client for the Ream framework

Readme

@c9up/comet

Agnostic JSON-RPC 2.0 protocol + an isomorphic, transport-injectable client for the Ream framework. Zero framework, zero transport, zero dependency — the browser binding (@c9up/aurora) and the server binding (@c9up/ream's RpcRouter) both build on this core instead of hand-rolling the envelope and error codes.

Client

The client owns the JSON-RPC logic (single + batch, id matching, error mapping) and delegates the actual bytes to an injected transport — so the same client runs in the browser or in Node:

import { createRpcClient } from "@c9up/comet";

const rpc = createRpcClient({
  url: "/rpc",
  transport: (url, body, { signal }) =>
    fetch(url, {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify(body),
      signal,
    }).then((r) => r.json()),
});

const out = await rpc.call("task.validate", { id: 7 });          // typed via call<T>()
await rpc.call("user.find", { id }, { parse: isUser });          // runtime-validated
await rpc.call("slow.op", p, { signal: ac.signal });             // abortable
const results = await rpc.batch([{ method: "a" }, { method: "b" }]); // settled per call

In the browser, prefer @c9up/aurora's createRpcClient — it wires aurora's HttpClient (base URL, auth headers, timeouts) as the transport and pairs with command().

Protocol

The @c9up/comet/protocol surface exposes the spec primitives a server binding needs: parseRequest, isNotification, buildRequest/buildSuccess/buildError, RpcError/toRpcError/isRpcShapedError, and the reserved RpcErrorCode.

parseRequest enforces the envelope MUSTs — the version, the method, an id that is a String/Number/Null, and a params that is a Structured value (§4.2: an Array or an Object, never a scalar). A handler raises a domain error by throwing RpcError; isRpcShapedError also accepts a plain object whose code is a negative integer, the space the spec gives errors, so the numeric code an aborted fetch or a gRPC status happens to carry is not mistaken for one.