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:
@@ -100,6 +100,10 @@ class HyperP2POverlayTopology extends EventEmitter {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
isEmpty () {
|
||||
return this.snapshot().degree === 0
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return { ...this._stats, degree: this._neighbors.size, protocol: PROTOCOL }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user