Files
modules/state-crdts/hyper-p2p-crdt-rga-text
2026-05-21 00:07:44 -04:00
..
2026-05-20 23:36:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-21 00:07:44 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 23:36:32 -04:00

hyper-p2p-crdt-rga-text

RGA-style text CRDT: insert/delete characters by stable charId with index-based ordering.

Category: State CRDTs · Protocol: crdt-rga-text/v1

When to use

Collaborative plain-text buffers where each character has a stable id.

When not to use

Rich document models with attributed runs (build higher layers). Binary blobs (use chunk/stream modules).

Quick start

const { HyperP2PCrdtRgaText } = require('hyper-p2p-crdt-rga-text')
const doc = new HyperP2PCrdtRgaText({ topic: process.argv[2] })
await doc.ready()
doc.insert(0, 'a1', 'H')
doc.insert(1, 'a2', 'i')
console.log(doc.toString())

Docs

docs/api.md · docs/architecture.md

Test

npm install && npm test · bare examples/basic.js [topic]