Trim a list to the specified range
method
RedisClient.ltrim
@param key
The list key
@param start
The start index (0-based, can be negative)
@param stop
The stop index (0-based, can be negative)
@returns
Promise that resolves with "OK"
await redis.rpush("mylist", "one", "two", "three", "four");
await redis.ltrim("mylist", 1, 2);
// List is now: ["two", "three"]
Referenced types
type KeyLike = string | ArrayBufferView | Blob