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:
@@ -108,6 +108,14 @@ class HyperP2POverlayTopology extends EventEmitter {
|
||||
return this.snapshot().degree
|
||||
}
|
||||
|
||||
listKeys () {
|
||||
return this.neighborIds()
|
||||
}
|
||||
|
||||
keyCount () {
|
||||
return this.size()
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return { ...this._stats, degree: this._neighbors.size, protocol: PROTOCOL }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user