Arguments
string
required
The key of the list.
number
required
The index of the first element to keep.
TValue
required
The index of the first element to keep.
Response
OKDocumentation 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", "b", "c", "d");
await redis.ltrim("key", 1, 2);
// the list is now ["b", "c"]
Trim a list to the specified range
OKawait redis.lpush("key", "a", "b", "c", "d");
await redis.ltrim("key", 1, 2);
// the list is now ["b", "c"]
Was this page helpful?