lPop(key: string): string
Parameter | Type | Description |
key | string | Key name. |
Type | Description |
string | On success, the first element in the list is returned. |
import redis from "pts/redis";let client = new redis.Client("redis://:<password>@<host>:6379/0");export default function main() {let lPushResp = client.lPush("list", "foo");console.log(redis lPush $
{
lPushResp
}
); // 1let lPopResp = client.lPop("list");console.log(redis lPop $
{
lPopResp
}
); // foo}