Files
modules/state-crdts/hyper-p2p-crdt-or-map
2026-05-20 22:56:32 -04:00
..
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 21:19:52 -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 22:56:32 -04:00

hyper-p2p-crdt-or-map

Observed-remove map: each key is an LWW register with tombstones.

Protocol: crdt-or-map/v1

When to use

  • Replicated JSON-like documents keyed by field name.
  • Maps where deletes must propagate and win over stale sets.

When not to use

  • Ordered collaborative text (use RGA text).
  • Counters without keys.

Quick start

const { HyperP2PCrdtOrMap } = require('hyper-p2p-crdt-or-map')
const map = new HyperP2PCrdtOrMap({ topic: 'doc-fields' })
await map.ready()
map.set('title', 'Hello')
map.remove('draft')
console.log(map.keys())
await map.close()

Docs

Test

npm install && npm test