Add isEmpty() helpers across all modules with clearable state.
Seventh expansion pass: domain-specific isEmpty() after moduleSnapshot on every module that has clearAll(), using existing count/snapshot helpers (async variants for temporal, spatial, semantic-vector, and reactive-state indexes). Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -79,6 +79,10 @@ class HyperP2PCrdtVersionVector extends EventEmitter {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
isEmpty () {
|
||||
return Object.keys(this.snapshot()).length === 0
|
||||
}
|
||||
|
||||
get (peer) {
|
||||
return this._clock.get(assertPeer(peer)) || 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user