ParsedHost
●utils · /index·interface
Structured breakdown of a host header.
Properties
PROPTYPEDESCRIPTION
isDev
boolean
True when the hostname lives on a development TLD.
port
number
Port if present and valid, else null.
segments
readonly string[]
Raw segment list, useful for callers that want to walk the labels.
Related
AppName BuildEnv DevTld Hostname ShopHandle appFromHost isDevelopment isDevHost
parseHost
Tokenize a host header into its hostname/port/app/shop parts. myshop.storefront.localhost:443 → { hostname: 'myshop.storefront.localhost', port: 443, isDev: tru
portFromHost
Extract a numeric port from a host string, IPv6safe. Returns null when no port is present or it is not a valid integer.