NodeRedis/node-redis

View on GitHub
packages/client/lib/commands/ZRANGE_WITHSCORES.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Command } from '../RESP/types';
import { transformSortedSetReply } from './generic-transformers';
import ZRANGE from './ZRANGE';

export default {
  CACHEABLE: ZRANGE.CACHEABLE,
  IS_READ_ONLY: ZRANGE.IS_READ_ONLY,
  parseCommand(...args: Parameters<typeof ZRANGE.parseCommand>) {
    const parser = args[0];

    ZRANGE.parseCommand(...args);
    parser.push('WITHSCORES');
  },
  transformReply: transformSortedSetReply
} as const satisfies Command;