bpms_site/.svn/pristine/e1/e122b9baa782397cb4eee24ca573c801e075ac04.svn-base
2025-11-02 16:38:49 +03:30

11 lines
332 B
Plaintext

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