You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {String} args.url a string in format of redis://[:password@]host[:port][/db-number][?option=value]
96
+
* @returns {Object} the input object args if it is falsy, does not contain url or url is not string, otherwise a new object with own properties of args
97
+
* but with host, port, db, ttl and auth_pass properties overridden by those provided in args.url.
98
+
*/
99
+
functiongetFromUrl(args){
100
+
if(!args||typeofargs.url!=='string'){
101
+
returnargs;
102
+
}
103
+
104
+
try{
105
+
varoptions=redisUrl.parse(args.url);
106
+
// make a clone so we don't change input args
107
+
returnapplyOptionsToArgs(args,options);
108
+
}catch(e){
109
+
//url is unparsable so returning original
110
+
returnargs;
111
+
}
112
+
113
+
}
114
+
115
+
/**
116
+
* Clones args'es own properties to a new object and sets isCacheableValue on the new object
0 commit comments