const originalBit = await redis.setbit(key, 4, 1);

Arguments

key
string
required
The key of the bitset
offset
integer
required
Specify the offset at which to set the bit.
value
0 | 1
required
The bit to set

Response

The original bit value stored at offset.
const originalBit = await redis.setbit(key, 4, 1);