Arguments
string
required
The key of the list.
...TValue[]
required
One or more elements to push at the head of the list.
Response
The length of the list after the push operation.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
const length1 = await redis.lpush("key", "a", "b", "c");
console.log(length1); // 3
const length2 = await redis.lpush("key", "d");
console.log(length2); // 4
Push an element at the head of the list.
const length1 = await redis.lpush("key", "a", "b", "c");
console.log(length1); // 3
const length2 = await redis.lpush("key", "d");
console.log(length2); // 4
Was this page helpful?