Add hasKey() and getKey() helpers across keyed modules (tenth pass).

Domain-aware lookup aliases on modules that already expose listKeys/keyCount, including async indexes and probabilistic bloom sets.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 05:36:11 -04:00
co-authored by Cursor
parent 7f4f31d4d4
commit f194ead341
118 changed files with 985 additions and 0 deletions
@@ -116,6 +116,14 @@ class HyperP2POverlayTopology extends EventEmitter {
return this.size()
}
hasKey (key) {
return this.hasNeighbor(key)
}
getKey (key) {
return this._neighbors.get(String(key)) ?? null
}
getStats () {
return { ...this._stats, degree: this._neighbors.size, protocol: PROTOCOL }
}