Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Add one or more members to a set
await redis.sadd(key, member, ...members);
const result = await redis.sadd("myset", "hello"); console.log(result); // 1
const result = await redis.sadd("fruits", "apple", "banana", "orange"); console.log(result); // 3
await redis.sadd("colors", "red", "blue"); const result = await redis.sadd("colors", "red", "green"); console.log(result); // 1 (only "green" was added)
const result = await redis.sadd("numbers", 1, 2, 3, 4, 5); console.log(result); // 5