code: function (peerURL) {
          let host = peerURL;
          /* istanbul ignore else */
          // The host should never be null, empty or undefined based on how this method is used.
          // This check is an additional precaution.
          if (host) {
              if (host.indexOf('//') >= 0) {
                  host = host.substring(host.indexOf('//') + 2);
              }
              if (host.indexOf('/') >= 0) {
                  host = host.substring(0, host.indexOf('/'));
              }
          }
          return host;
      }
docs: Utility function to get peer socket URL