tencent cloud

All product documents
Tencent Cloud Observability Platform
Client.sRem
Last updated: 2025-03-11 20:05:04
Client.sRem
Last updated: 2025-03-11 20:05:04
The sRem method is used to remove one or more members from the set.
sRem(key: string, ...members: (string | number)[]): number

Parameters

Parameter
Type
Description
key
string
Key name.
...members
(string | number)[]
The members to be deleted.

Return

Type
Description
number
On success, the number of members successfully deleted is returned.

Samples

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", "world");
console.log(redis sAdd ${sAddResp}); // 2
let sRemResp = client.sRem("set", "hello");
console.log(redis sRem ${sRemResp}); // 1
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support