JSFiddle - React, Tailwind, and code Playground
by Paco86
JavaScript
var link = document.createElement('a');
link.href = "https://example.com:3000/pathname/?search=test#hash"
var url = new URL('https://example.com:3000/pathname/?search=test#hash')
console.log(url)
/* console.log(link.port)
console.log(link.hostname)
console.log(link.pathname)
console.log(link.search)
console.log(link.host)
console.log(link.protocol) */