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:
@@ -139,6 +139,10 @@ class HyperP2PStreamMultiplex extends EventEmitter {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
isEmpty () {
|
||||
return this.snapshot().open === 0
|
||||
}
|
||||
|
||||
openStreamBatch (ids) {
|
||||
if (!Array.isArray(ids)) throw new Error('ids array required')
|
||||
return ids.map((id) => this.openStream(id))
|
||||
|
||||
Reference in New Issue
Block a user