You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fix some Z (sorted list) commands, increase commands test coverage
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { transformArgumentNumberInfinity } from './generic-transformers';
|
||||
import { transformArgumentStringNumberInfinity } from './generic-transformers';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
|
||||
@@ -12,13 +12,19 @@ interface ZRangeStoreOptions {
|
||||
WITHSCORES?: true;
|
||||
}
|
||||
|
||||
export function transformArguments(dst: string, src: string, min: number, max: number, options?: ZRangeStoreOptions): Array<string> {
|
||||
export function transformArguments(
|
||||
dst: string,
|
||||
src: string,
|
||||
min: string | number,
|
||||
max: string | number,
|
||||
options?: ZRangeStoreOptions
|
||||
): Array<string> {
|
||||
const args = [
|
||||
'ZRANGESTORE',
|
||||
dst,
|
||||
src,
|
||||
transformArgumentNumberInfinity(min),
|
||||
transformArgumentNumberInfinity(max)
|
||||
transformArgumentStringNumberInfinity(min),
|
||||
transformArgumentStringNumberInfinity(max)
|
||||
];
|
||||
|
||||
switch (options?.BY) {
|
||||
|
Reference in New Issue
Block a user