| 1 | import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; |
| 2 | |
| 3 | export const FIRST_KEY_INDEX = 1; |
| 4 | |
| 5 | export const IS_READ_ONLY = true; |
| 6 | |
| 7 | export function transformArguments( |
| 8 | key: RedisCommandArgument, |
| 9 | ranks: Array<number> |
| 10 | ): RedisCommandArguments { |
| 11 | const args = ['TDIGEST.BYREVRANK', key]; |
| 12 | for (const rank of ranks) { |
| 13 | args.push(rank.toString()); |
| 14 | } |
| 15 | |
| 16 | return args; |
| 17 | } |
| 18 | |
| 19 | export { transformDoublesReply as transformReply } from '.'; |