pow/pow_service.js
function _getHostByPeerUrl( sUrl )
{
	let arrMatches;

	//
	//	this regex will match wss://xxx and ws://xxx
	//
	arrMatches = sUrl.match( /^wss?:\/\/(.*)$/i );
	if ( Array.isArray( arrMatches ) && arrMatches.length >= 1 )
	{
		sUrl = arrMatches[ 1 ];
	}

	//	...
	arrMatches	= sUrl.match( /^(.*?)[:\/]/ );
	return ( Array.isArray( arrMatches ) && arrMatches.length >= 1 ) ? arrMatches[ 1 ] : sUrl;
}
function _getHostByPeerUrl( sUrl )
{
	let arrMatches;

	//
	//	this regex will match wss://xxx and ws://xxx
	//
	arrMatches = sUrl.match( /^wss?:\/\/(.*)$/i );
	if ( Array.isArray( arrMatches ) && arrMatches.length >= 1 )
	{
		sUrl = arrMatches[ 1 ];
	}

	//	...
	arrMatches	= sUrl.match( /^(.*?)[:\/]/ );
	return ( Array.isArray( arrMatches ) && arrMatches.length >= 1 ) ? arrMatches[ 1 ] : sUrl;
}
function _getHostByPeerUrl ( sUrl ) { let arrMatches ; // //	this regex will match wss://xxx and ws://xxx // arrMatches = sUrl . match ( / ^wss?:\/\/(.*)$ / i ) ; if ( Array . isArray ( arrMatches ) && arrMatches . length >= 1 ) { sUrl = arrMatches [ 1 ] ; } //	... arrMatches = sUrl . match ( / ^(.*?)[:\/] / ) ; return ( Array . isArray ( arrMatches ) && arrMatches . length >= 1 ) ? arrMatches [ 1 ] : sUrl ; }
get host by peer url

@private
@param	{string}	sUrl
@return {string}
get host by peer url