setKeyIf
constsetKeyIf:any=addon.setKeyIf
Defined in: index.cts:568
Atomically updates a key only when its current value matches the expected check value.
key
Key to update (Buffer, ArrayBuffer, or string).
newValue
Optional replacement value. Pass undefined to delete the key on success.
checkValue
Optional expected value. Pass undefined to require that the key is absent.
Returns
Section titled “Returns”true when the compare-and-set succeeds, false otherwise.