sAdd(key: string, ...members: (string | number)[]): number
Parameter | Type | Description |
key | string | Key name. |
...members | (string | number)[] | The members to be added. |
Type | Description |
number | On success, the number of members successfully added is returned. |
import redis from "pts/redis";let client = new redis.Client("redis://:<password>@<host>:6379/0");export default function main() {let sAddResp = client.sAdd("set", "hello");console.log(redis sAdd $
{
sAddResp
}
); // 1}