Msetnx
Bun

method

RedisClient.setnx

key: KeyLike,
value: KeyLike
): Promise<number>;

Set the value of a key, only if the key does not exist

@param key

The key to set

@param value

The value to set

@returns

Promise that resolves with 1 if the key was set, 0 if the key was not set

Referenced types

type KeyLike = string | ArrayBufferView | Blob