a5ebd19ec2
all the refactored connection handling code resides in the connection.js file, its a lot more rebost although still might have bugs
19 lines
398 B
JavaScript
19 lines
398 B
JavaScript
var utils = {
|
|
randStr: function() {
|
|
var str = [];
|
|
var hexDigits = "0123456789abcdef";
|
|
for (var i = 0; i < 36; i++) {
|
|
str[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
|
|
}
|
|
return str.join("");
|
|
},
|
|
mixin: function(fromObj, toObj) {
|
|
for (var key in toObj) {
|
|
if (toObj.hasOwnProperty(key) && fromObj[key]) {
|
|
toObj[key] = fromObj[key];
|
|
}
|
|
}
|
|
return toObj;
|
|
}
|
|
};
|