You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
fix #1802
This commit is contained in:
@ -79,22 +79,12 @@ export function transformRedisJsonReply(json: string): RedisJSON {
|
||||
return JSON.parse(json);
|
||||
}
|
||||
|
||||
export function transformRedisJsonArrayReply(jsons: Array<string>): Array<RedisJSON> {
|
||||
return jsons.map(transformRedisJsonReply)
|
||||
}
|
||||
|
||||
export function transformRedisJsonNullReply(json: string | null): RedisJSON | null {
|
||||
if (json === null) return null;
|
||||
|
||||
return transformRedisJsonReply(json);
|
||||
}
|
||||
|
||||
export function transformRedisJsonNullArrayNullReply(jsons: Array<string | null> | null): Array<RedisJSON | null> | null {
|
||||
if (jsons === null) return null;
|
||||
|
||||
return jsons.map(transformRedisJsonNullReply);
|
||||
}
|
||||
|
||||
export function transformNumbersReply(reply: string): number | Array<number> {
|
||||
return JSON.parse(reply);
|
||||
}
|
||||
|
Reference in New Issue
Block a user