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

@fuaran-ui/op-stream

v0.6.0

Published

Op-stream persistence + replay for the Fuaran UI wire format — a hash-chained, append-only record of every applied TreeOp, with an in-memory sink and a replay engine. The TypeScript port of Fuaran.UI.OpStream.{Abstractions,InMemory,Replay}; OpRecord hash

Readme

@fuaran-ui/op-stream

Hash-chained op-stream persistence + replay for the Fuaran UI wire format — the TypeScript port of the F# Fuaran.UI.OpStream.{Abstractions,InMemory,Replay} tier.

Every applied TreeOp becomes an append-only, SHA-256-chained OpRecord. Because the chain consumes @fuaran-ui/ops's canonical encoder for input determinism, an OpRecord hash is bit-identical to the F# tier over the same op sequence — so a TypeScript-authored stream is a full op-history peer of the F# tier: replayable and tamper-evident (FGP 5 — the op stream is the source of truth).

Install

npm install @fuaran-ui/op-stream

Peer dependencies: @fuaran-ui/schema, @fuaran-ui/ops.

Usage

import {
  createInMemorySink,
  applyAndPersist,
  replayStream,
  verifyChain,
} from '@fuaran-ui/op-stream';
import type { PersistContext } from '@fuaran-ui/op-stream';

const sink = createInMemorySink();
const ctx: PersistContext = { streamId: 'session-1', userId: 'alice' };

// Apply an op and durably record it in one call.
let tree = initialTree;
const result = await applyAndPersist(sink, ctx, op, tree);
if (result.ok) tree = result.value;

// Reconstruct the tree from the stream (resume from any sequence / checkpoint).
const replayed = await replayStream(sink, 'session-1', initialTree);

// Prove the stream was not tampered with.
const violation = verifyChain(
  await sink.replay('session-1', 1, await sink.latestSequence('session-1')),
);
// violation === undefined ⟺ clean chain

Surface

| Export | Role | | ------------------------------------------- | --------------------------------------------------------------------------------------- | | InMemorySink / createInMemorySink | Map-backed IOpStreamCheckpointSink — tests + client-side authoring. | | applyAndPersist | Apply once, then persist a hash-chained OpRecord on success (best-effort durability). | | applyTo / replayStream | Fold a record sequence through the @fuaran-ui/ops apply engine. | | computeHash / verifyChain / sha256Hex | The hash-chain primitive — dependency-free, synchronous, isomorphic. | | genesisPreviousHash | Sixty-four 0 characters — the genesis link of every stream. |

The SQLite sink (Fuaran.UI.OpStream.Sqlite) is intentionally out of scope; an IndexedDB-backed sink is a candidate follow-up. The in-memory sink is sufficient for the client-side authoring loop.

Stability

The OpRecord wire shape + hash-chain semantics are declared stable in STABILITY.md. The in-memory sink is stable on ship.

Apache-2.0.