Files
novarix.uk/node_modules/next/dist/esm/server/lib/format-hostname.js
T
Kismet Hasanaj 39a8a128be including-modules
2026-05-03 00:14:08 +02:00

11 lines
332 B
JavaScript

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