Add removeKey() and deleteKey() helpers across keyed modules (eleventh pass).
Domain-aware removal aliases on modules with hasKey/getKey, including async indexes and no-op cases for grow-only and bloom filters. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -141,6 +141,14 @@ class HyperP2PNoiseSessionWrap extends EventEmitter {
|
||||
return this.getSession(key)
|
||||
}
|
||||
|
||||
removeKey (key) {
|
||||
return this.closeSession(key)
|
||||
}
|
||||
|
||||
deleteKey (key) {
|
||||
return this.removeKey(key)
|
||||
}
|
||||
|
||||
createSessionBatch (optsList) {
|
||||
if (!Array.isArray(optsList)) throw new Error('optsList array required')
|
||||
return optsList.map((opts) => this.createSession(opts))
|
||||
|
||||
Reference in New Issue
Block a user