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