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

@tty-pt/corm

v2.2.4

Published

Universal Node.js and Browser bindings for libcorm and Corm Recall Kernel (cormr)

Readme

@tty-pt/corm

npm version License: BSD-2-Clause TypeScript Ready Node.js Native WebAssembly Zero Dependencies

Universal Node.js and Browser bindings for libcorm and the Corm Recall Kernel (cormr). Features persistent memory-mapped storage, candidate set algebra, streaming min-heap ranking, and multi-axis composable queries.


1. Quickstart

npm install @tty-pt/corm
import { CormDb, CandidateSet, MinHeapRanker } from "@tty-pt/corm";

// 1. Persistent key-value storage (Node mmap or Browser in-memory/OPFS)
const db = new CormDb("./data.corm", "app_store");
db.put("member:101", { name: "Alice", role: "admin" });
const member = db.get("member:101");
console.log(member); // { name: "Alice", role: "admin" }

// 2. Ultra-fast Candidate Set Algebra (cormr_set_t)
const setA = new CandidateSet();
setA.push(10).push(20).push(30).seal();

const setB = new CandidateSet();
setB.push(20).push(30).push(40).seal();

const intersection = setA.intersect(setB);
console.log(intersection.toArray()); // [20, 30]

// 3. Streaming Bounded Min-Heap Ranker (cormr_rank_t)
const ranker = new MinHeapRanker(3 /* topK */, 0.2 /* minScore */);
ranker.push(101, 0.85);
ranker.push(102, 0.95);
ranker.push(103, 0.40);
console.log(ranker.sorted()); // [{ ref: 102, score: 0.95 }, { ref: 101, score: 0.85 }, ...]

db.close();

2. Dual-Engine Runtime: Native Speed & Browser Portability

@tty-pt/corm operates on an infallible 3-tier runtime engine:

  1. Node.js Native (N-API): Executes native C99 compiled binaries with direct OS memory mapping (mmap(2)), zero copy, and multi-gigabyte storage throughput.
  2. Browser & Edge WebAssembly: When running in the browser, Cloudflare Workers, or environments without a C compiler, it seamlessly falls back to the pre-compiled dist/corm.wasm reactor with zero native dependencies.

3. Composable Multi-Axis Queries

The Corm Recall Kernel coordinates orthogonal domain axes (joint for time, islet for space, lemma for text, sepal for vectors) into unified boolean filtering and ranking:

import { CormDb, JointTemporalAxis, SepalVectorAxis } from "@tty-pt/corm";

const db = new CormDb("./workspace.corm");
const temporal = new JointTemporalAxis();
const vector = new SepalVectorAxis();

db.registerAxis(temporal);
db.registerAxis(vector);

// Compose: Filter by temporal window AND rank by dense vector cosine similarity
const hits = await db
  .query()
  .filter("temporal", { start: 1793405000, end: 1793415000 })
  .rank("vector", { queryVector: [0.12, 0.85, 0.44] })
  .topK(5)
  .execute();

4. C Development Headers via NPM

This package includes the canonical C development headers in include/ and corm.pc:

# Include in your C Makefile without system installation:
CFLAGS += -I./node_modules/@tty-pt/corm/include
LDLIBS += -lcorm

5. Building from Source

make npm-build    # Compiles native addon (build/Release/) and WASM reactor (dist/)
make npm-test     # Runs verification test suite

License

BSD 2-Clause License. Copyright (c) 2026, tty-pt.