1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Fix domain handling and tls camelCase settings

Fixes #1106
Fixes #1103
Closes #1104
This commit is contained in:
Ruben Bridgewater
2016-10-30 21:29:35 +01:00
parent d8d0e2d3e3
commit 41d26dc0c8
5 changed files with 33 additions and 5 deletions

View File

@@ -57,6 +57,10 @@ function clone (obj) {
var elems = Object.keys(obj);
var elem;
while (elem = elems.pop()) {
if (elem === 'tls') { // special handle tls
copy[elem] = obj[elem];
continue;
}
// Accept camelCase options and convert them to snake_case
var snake_case = elem.replace(/[A-Z][^A-Z]/g, '_$&').toLowerCase();
// If camelCase is detected, pass it to the client, so all variables are going to be camelCased