lib/services/references.js
function urlToUri(url) {
  let parts;

  if (!isUrl(url)) {
    throw new Error('Invalid url ' + url);
  }
  parts = urlParse.parse(url);

  return `${parts.hostname}${decodeURIComponent(parts.path)}`;
}
function urlToUri(url) {
  let parts;

  if (!isUrl(url)) {
    throw new Error('Invalid url ' + url);
  }
  parts = urlParse.parse(url);

  return `${parts.hostname}${decodeURIComponent(parts.path)}`;
}
function urlToUri ( url ) { let parts ; if ( ! isUrl ( url ) ) { throw new Error ( 'Invalid url ' + url ) ; } parts = urlParse . parse ( url ) ; return ` ${ parts . hostname } ${ decodeURIComponent ( parts . path ) } ` ; }
Remove protocol and port
@param {string} url
@returns {string}
Remove protocol and port