Returns the hostname of the given URL or empty string.
the URL to parse
the hostname of the URL or empty string
import { hostname } from "@trashpanda001/helpers/string"hostname("https://example.com/foo")// "example.com" Copy
import { hostname } from "@trashpanda001/helpers/string"hostname("https://example.com/foo")// "example.com"
Returns the hostname of the given URL or empty string.