You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-11 22:42:42 +03:00
chore: mark private variables as such and remove obsolete ones
This commit is contained in:
@@ -128,8 +128,8 @@ function returnErr (client, command) {
|
||||
function normalizeAndWrite (client, command) {
|
||||
const args = command.args
|
||||
const origName = command.command
|
||||
const renameCommands = client.renameCommands
|
||||
const name = renameCommands[origName] !== undefined
|
||||
const renameCommands = client._options.renameCommands
|
||||
const name = renameCommands !== undefined && renameCommands[origName] !== undefined
|
||||
? renameCommands[origName]
|
||||
: origName
|
||||
|
||||
@@ -142,12 +142,12 @@ function normalizeAndWrite (client, command) {
|
||||
return returnErr(client, command)
|
||||
}
|
||||
|
||||
if (typeof client.options.prefix === 'string') {
|
||||
if (typeof client._options.prefix === 'string') {
|
||||
const prefixKeys = Commands.getKeyIndexes(origName, copy)
|
||||
prefixKeys.forEach((i) => {
|
||||
// Attention it would be to expensive to detect if the input is non utf8 Buffer
|
||||
// In that case the prefix *might* destroys user information
|
||||
copy[i] = client.options.prefix + copy[i]
|
||||
copy[i] = client._options.prefix + copy[i]
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user