deno.com
property URL.hostname

The hostname property of the URL interface is a string that represents the fully qualified domain name of the URL.

Examples #

#
const myURL = new URL('https://foo.example.org/bar');
console.log(myURL.hostname);  // Logs "foo.example.org"

Type #

string

See #