packages/ove-core/src/server/messaging.js
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;
    }
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;
    }
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 ; }
Utility function to get peer socket URL
Utility function to get peer socket URL