Set
SADD
Adds one or more members to a set.
// 3
await redis.sadd("key", "a", "b", "c");
// 0
await redis.sadd("key", "a", "b");
Arguments
key
string
requiredThe key of the set.
members
...TValue[]
requiredOne or more members to add to the set.
Response
The number of elements that were added to the set, not including all the elements already present in the set.
// 3
await redis.sadd("key", "a", "b", "c");
// 0
await redis.sadd("key", "a", "b");