Generic
TYPE
Get the type of a key.
Arguments
keybodystrrequired
The key to get.
Response
strrequired
The type of the key.
One of string | list | set | zset | hash | none
Example
redis.set("key1", "Hello")assert redis.type("key1") == "string"redis.lpush("key2", "Hello")assert redis.type("key2") == "list"assert redis.type("non-existent-key") == "none"