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

Function inetAddressFromIpString

packages/effect/src/net/NetAddress.ts:1695–1700  ·  view source on GitHub ↗
(
  address: string,
  port: number
)

Source from the content-addressed store, hash-verified

1693 * @since 4.0.0
1694 */
1695export const inetAddressFromIpString = (
1696 address: string,
1697 port: number
1698): Result.Result<InetAddress, NetAddressError> => {
1699 return Result.flatMap(ipFromString(address), (address) => inetAddress(address, port))
1700}
1701
1702/**
1703 * Creates an internet address from a trusted numeric IP string and port.

Callers 1

Calls 2

ipFromStringFunction · 0.85
inetAddressFunction · 0.85

Tested by

no test coverage detected