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:
@@ -297,6 +297,15 @@ class SpatialIndex extends EventEmitter {
|
||||
return s.points
|
||||
}
|
||||
|
||||
async listKeys () {
|
||||
return [...this.localPoints.keys()]
|
||||
}
|
||||
|
||||
async keyCount () {
|
||||
const s = await this.snapshot()
|
||||
return s.points
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return {
|
||||
...this._stats,
|
||||
|
||||
Reference in New Issue
Block a user