hyper-p2p-crdt-rga-text
RGA-style collaborative text (insert by index + charId, tombstone delete).
Protocol: crdt-rga-text/v1
When to use
- Lightweight multi-peer text buffers (chat lines, shared notes).
- Index-addressable inserts with stable character ids.
When not to use
- Rich OT/CRDT editors needing fractional indexing at scale (use dedicated collab stack).
- Binary blobs.
Quick start
const { HyperP2PCrdtRgaText } = require('hyper-p2p-crdt-rga-text')
const doc = new HyperP2PCrdtRgaText({ topic: 'notes' })
await doc.ready()
doc.insert(0, 'id-1', 'Hi')
doc.delete('id-1')
console.log(doc.toString())
await doc.close()
Docs
Test
npm install && npm test