MCPcopy Create free account
hub / github.com/Effect-TS/effect / formatHost

Function formatHost

packages/effect/src/net/NetAddress.ts:2040–2041  ·  view source on GitHub ↗
(self: InetAddress)

Source from the content-addressed store, hash-verified

2038 * @since 4.0.0
2039 */
2040export const formatHost = (self: InetAddress): string =>
2041 formatIp(self.address) + (isInetAddressV6(self) && self.scopeId !== 0 ? `%${self.scopeId}` : "")
2042
2043/**
2044 * Formats an internet address's host for a native socket API, without brackets

Callers 2

formatNativeHostFunction · 0.70
formatInetFunction · 0.70

Calls 2

formatIpFunction · 0.85
isInetAddressV6Function · 0.85

Tested by

no test coverage detected