You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-13 10:02:24 +03:00
chore: add print helper again and refactor some code
Expose the RedisClient directly instead of only being a property
This commit is contained in:
@@ -23,6 +23,12 @@ function addCommand (clientProto, multiProto, command) {
|
||||
})
|
||||
}
|
||||
}
|
||||
Object.defineProperty(clientProto, commandName.toUpperCase(), {
|
||||
enumerable: false,
|
||||
configurable: false,
|
||||
writable: false,
|
||||
value: clientProto[commandName]
|
||||
})
|
||||
|
||||
// Do not override existing functions
|
||||
if (!multiProto[command] && command !== 'multi') {
|
||||
@@ -41,6 +47,12 @@ function addCommand (clientProto, multiProto, command) {
|
||||
})
|
||||
}
|
||||
}
|
||||
Object.defineProperty(multiProto, commandName.toUpperCase(), {
|
||||
enumerable: false,
|
||||
configurable: false,
|
||||
writable: false,
|
||||
value: clientProto[commandName]
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = addCommand
|
||||
|
Reference in New Issue
Block a user