Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
No EOL
332 B
Text
11 lines
No EOL
332 B
Text
import { isIPv6 } from './is-ipv6';
|
|
/**
|
|
* Formats a hostname so that it is a valid host that can be fetched by wrapping
|
|
* IPv6 hosts with brackets.
|
|
* @param hostname
|
|
* @returns
|
|
*/ export function formatHostname(hostname) {
|
|
return isIPv6(hostname) ? `[${hostname}]` : hostname;
|
|
}
|
|
|
|
//# sourceMappingURL=format-hostname.js.map |