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:
@@ -95,6 +95,14 @@ class HyperP2PCrdtVersionVector extends EventEmitter {
|
||||
return this.size()
|
||||
}
|
||||
|
||||
hasKey (key) {
|
||||
return this._clock.has(String(key))
|
||||
}
|
||||
|
||||
getKey (key) {
|
||||
return this.get(key)
|
||||
}
|
||||
|
||||
get (peer) {
|
||||
return this._clock.get(assertPeer(peer)) || 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user