mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
6 lines
217 B
TypeScript
6 lines
217 B
TypeScript
/** Get hostname from url in lower case */
|
|
export function getUrlHostname(url: string | URL): string {
|
|
const hostname = typeof url === 'string' ? new URL(url).hostname : url.hostname
|
|
return hostname.toLowerCase()
|
|
}
|