Add listKeys() and keyCount() helpers across modules (ninth pass).
Standardize key enumeration after size() on map- and registry-style modules, aliasing existing list* methods or primary store keys so callers can inspect occupancy without parsing snapshots. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -83,6 +83,14 @@ class HyperP2PCrdtTwoPhaseSet extends EventEmitter {
|
||||
return s.added.length === 0 && s.removed.length === 0
|
||||
}
|
||||
|
||||
listKeys () {
|
||||
return this.elements()
|
||||
}
|
||||
|
||||
keyCount () {
|
||||
return this.size()
|
||||
}
|
||||
|
||||
bulkAdd (elements) {
|
||||
if (!Array.isArray(elements)) throw new Error('elements array required')
|
||||
let n = 0
|
||||
|
||||
Reference in New Issue
Block a user