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

@cliffy-ga/core

v0.3.1

Published

WebAssembly bindings for Cliffy reactive framework with Algebraic TSX

Downloads

147

Readme

cliffy-wasm

WebAssembly bindings for the Cliffy reactive framework.

Overview

cliffy-wasm provides JavaScript/TypeScript bindings for Cliffy, enabling reactive UI development in browsers with geometric algebra state management.

Installation

npm install @cliffy-ga/core

Quick Start

import init, { behavior, html, mount } from '@cliffy-ga/core';

await init();

const count = behavior(0);

const app = html`
  <div>
    <h1>Count: ${count}</h1>
    <button onclick=${() => count.update(n => n + 1)}>+</button>
    <button onclick=${() => count.update(n => n - 1)}>-</button>
  </div>
`;

mount(app, '#app');

Core API

Behavior

Reactive state containers:

import { behavior, combine } from '@cliffy-ga/core';

const name = behavior('World');
const greeting = name.map(n => `Hello, ${n}!`);

name.subscribe(value => console.log('Name changed:', value));
name.set('Cliffy');

// Combine behaviors
const a = behavior(10);
const b = behavior(20);
const sum = combine(a, b, (x, y) => x + y);

Event

Discrete event streams:

import { event } from '@cliffy-ga/core';

const clicks = event();
const clickCount = clicks.fold(0, (acc, _) => acc + 1);

clicks.subscribe(e => console.log('Clicked!', e));
clicks.emit({ x: 100, y: 200 });

Geometric State

Smooth interpolation and transformations:

import { GeometricState, Rotor, Transform } from '@cliffy-ga/core';

const state = GeometricState.fromVector(1, 0, 0);
const rotated = state.applyRotor(Rotor.xy(Math.PI / 2));

// Smooth interpolation
const mid = state.blend(target, 0.5);

Distributed Protocols

Built-in CRDT and sync support:

import { GeometricCRDT, VectorClock, SyncState } from '@cliffy-ga/core';

const crdt = new GeometricCRDT('node-1', initialState);
crdt.add(5);

const merged = crdt.merge(otherCrdt);

Testing Framework

Algebraic testing in JavaScript:

import { testImpossible, testRare, Manifold } from '@cliffy-ga/core';

const report = testImpossible('invariant name', () => {
  // Return true if invariant holds
  return someCondition();
}, 100);

expect(report.verified).toBe(true);

Algebraic TSX

The html tagged template creates reactive DOM:

import { html, mount, behavior } from '@cliffy-ga/core';

const items = behavior(['Apple', 'Banana', 'Cherry']);

const app = html`
  <ul>
    ${items.map(list => list.map(item => html`<li>${item}</li>`))}
  </ul>
`;

mount(app, '#app');

Behaviors in templates automatically subscribe and update the DOM - no virtual DOM needed.

Building from Source

# Install wasm-pack
cargo install wasm-pack

# Build the package
cd cliffy-wasm
wasm-pack build --target web

# The output is in pkg/

TypeScript Support

Full TypeScript definitions are included:

import type { Behavior, Event, GeometricState } from '@cliffy-ga/core';

function createCounter(): Behavior<number> {
  return behavior(0);
}

License

MIT