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.
Get all members of a set
await redis.smembers(key);
await redis.sadd("myset", "hello", "world"); const members = await redis.smembers("myset"); console.log(members); // ["hello", "world"]
const members = await redis.smembers("nonexistent"); console.log(members); // []
await redis.sadd("numbers", 1, 2, 3, 4, 5); const members = await redis.smembers<number[]>("numbers"); console.log(members); // [1, 2, 3, 4, 5]
await redis.sadd("users:online", "user:1", "user:2", "user:3"); const onlineUsers = await redis.smembers("users:online"); console.log(onlineUsers); // ["user:1", "user:2", "user:3"]