Names the site a link points at, as the app shows it: a link dump's title when its page has none, a preview's site name, the digest's domain line and the tint of a card without artwork. The server's link checks key on it too (canonical-url.ts), so a link reads as the same site everywhere.

Functions

f
siteHost(raw: string): string | undefined

Returns siteHostOf the URL raw, or undefined when raw isn't one.

f
siteHostOf(url: URL): string

Returns url's host without a leading www.; URL has already lowered its case. www.youtube.com and youtube.com give youtube.com.