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

recurram

v0.1.0

Published

Node.js and TypeScript implementation of a fast, compact binary wire format for modern data transport.

Readme

Recurram (JS)

JavaScript/TypeScript bindings for recurram-rust with two backends:

  • Node.js: N-API (recurram-napi)
  • Browser/JS runtime: WebAssembly (recurram-wasm)

Integers decode as bigint by default (i64/u64 safe handling).

Requirements

  • Node.js 24+
  • Rust stable
  • wasm-pack for WASM builds

Build

pnpm install
pnpm build

Build steps:

  1. Build N-API addon (native/recurram_napi.node)
  2. Build WASM package (wasm/pkg/*)
  3. Build TypeScript output (dist/*)

Formatting

pnpm format
pnpm format:check

Test

pnpm test

What it validates:

  • Rust bridge tests (test:rust)
  • Node API tests (test:node) covering init, encode, decode, schema, batch, and session APIs
  • TypeScript API usage against built output

Usage (Node)

import {
  init,
  encode,
  decode,
  createSessionEncoder,
  toTransportJson,
  encodeTransportJson,
  type RecurramValue,
} from "recurram";

await init({ prefer: "napi" });

const value: RecurramValue = {
  id: 1001n,
  name: "alice",
  active: true,
};

const bytes = encode(value);
const roundtrip = decode(bytes);

const session = createSessionEncoder();
const first = session.encode(value);
const patch = session.encodePatch({ ...value, name: "alicia" });

const prepared = toTransportJson(value);
const fastest = encodeTransportJson(prepared);

High-throughput transport JSON APIs

For hot paths where you can prepare payloads ahead of time, use transport JSON APIs to reduce JS-side conversion overhead:

  • toTransportJson(value) / fromTransportJson(json)
  • toTransportJsonBatch(values)
  • encodeTransportJson(valueJson) / decodeToTransportJson(bytes)
  • encodeBatchTransportJson(valuesJson)

SessionEncoder also supports raw methods:

  • encodeTransportJson(valueJson)
  • encodeBatchTransportJson(valuesJson)
  • encodePatchTransportJson(valueJson)
  • encodeMicroBatchTransportJson(valuesJson)

Usage (Browser)

import { init, encode, decode } from "recurram";

await init({ prefer: "wasm" });

const bytes = encode({ id: 1n, role: "admin" });
const value = decode(bytes);

If you want to pass a custom WASM source, use wasmInput:

await init({ prefer: "wasm", wasmInput: "/assets/recurram_wasm_bg.wasm" });

TypeScript types

Main exported types:

  • RecurramValue
  • Schema, SchemaField
  • SessionOptions

RecurramValue includes bigint and Uint8Array support:

type RecurramValue =
  | null
  | boolean
  | number
  | bigint
  | string
  | Uint8Array
  | RecurramValue[]
  | { [key: string]: RecurramValue };

Publish to npm

The package is configured for npm publish and ships build artifacts from dist/, native/, and wasm/pkg/.

Local dry run:

pnpm build
pnpm pack

GitHub Actions publish:

  1. Add repository secret NPM_TOKEN.
  2. Bump version in package.json.
  3. Create and push matching tag v<version>.

Example:

git tag v0.1.0
git push origin v0.1.0

The workflow .github/workflows/publish-npm.yml verifies tag/version match and then runs pnpm publish.

License

This project is licensed under the MIT License - see the LICENSE file for details.