You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Support BIT|BYTE option (#2035)
* Support BIT|BYTE option * clean code * clean code * clean code Co-authored-by: leibale <leibale1998@gmail.com>
This commit is contained in:
@@ -9,7 +9,8 @@ export function transformArguments(
|
||||
key: RedisCommandArgument,
|
||||
bit: BitValue,
|
||||
start?: number,
|
||||
end?: number
|
||||
end?: number,
|
||||
mode?: 'BYTE' | 'BIT'
|
||||
): RedisCommandArguments {
|
||||
const args = ['BITPOS', key, bit.toString()];
|
||||
|
||||
@@ -21,6 +22,10 @@ export function transformArguments(
|
||||
args.push(end.toString());
|
||||
}
|
||||
|
||||
if (mode) {
|
||||
args.push(mode);
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user