export default href => {
  var link = document.createElement("a")
  link.href = href
  return (link.protocol + "//" + link.host + link.pathname + link.search + link.hash)
}

export default href => {
  var link = document.createElement("a")
  link.href = href
  return `${link.protocol}//${link.host}${link.pathname}${link.search}${link.hash}`
}

Use string templates rather than string concat
Update: Use string templates rather than string concat
