Redix LogoDocumentation
API ReferenceSets

SDiff

Get the difference between the first set and all successive sets

Syntax

Redix.SDiff(key1, key2, ..., callback)

Parameters

Prop

Type

Returns

Prop

Type

Examples

-- Find players in red team but not in blue team
Redix.SDiff('team:red', 'team:blue', function(err, redOnly)
    if not err then
        print('Red team exclusive players:', #redOnly)
    end
end)

-- Find offline players
Redix.SDiff('players:all', 'players:online', function(err, offline)
    print('Offline players:', #offline)
end)