var util = { inherits: function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }, extend: function(dest, source) { for(var key in source) { if(source.hasOwnProperty(key)) { dest[key] = source[key]; } } return dest; }, randomId: function () { return Math.random().toString(36).substr(2); }, prettyError: function (msg) { console.log('PeerServer: ', msg); } }; // if node module.exports = util; // end node