Arguments
string
required
The key of the list.
number
required
How many occurrences of the element to remove.
TValue
required
The element to remove
Response
The number of elements removed.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
await redis.lpush("key", "a", "a", "b", "b", "c");
const removed = await redis.lrem("key", 4, "b");
console.log(removed) // 2
Remove the first count occurrences of an element from a list.
await redis.lpush("key", "a", "a", "b", "b", "c");
const removed = await redis.lrem("key", 4, "b");
console.log(removed) // 2
Was this page helpful?