1
0
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:
Ruben Bridgewater
2017-05-28 07:15:20 +02:00
parent ba7a39c443
commit b2e18344d9
21 changed files with 179 additions and 165 deletions

View File

@@ -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]
})
}