Set

SMOVE

Move a member from one set to another

Arguments

sourcebodystringrequired

The key of the set to move the member from.

destinationbodystringrequired

The key of the set to move the member to.

memberbodyTMember

The members to move

Response

0 | 1required

1 if the member was moved, 0 if not.

Example
await redis.sadd("original", "a", "b", "c"); const moved =  await redis.smove("original", "destination", "a");// moved:       1// original:    ["b", "c"]// destination: ["a"]
Loading search…