MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getAddressFamily

Function getAddressFamily

src/utils/proxy.ts:41–55  ·  view source on GitHub ↗
(options: LookupOptions)

Source from the content-addressed store, hash-verified

39 * Handles: 0 | 4 | 6 | 'IPv4' | 'IPv6' | undefined
40 */
41export function getAddressFamily(options: LookupOptions): 0 | 4 | 6 {
42 switch (options.family) {
43 case 0:
44 case 4:
45 case 6:
46 return options.family
47 case 'IPv6':
48 return 6
49 case 'IPv4':
50 case undefined:
51 return 4
52 default:
53 throw new Error(`Unsupported address family: ${options.family}`)
54 }
55}
56
57type EnvLike = Record<string, string | undefined>
58

Callers 1

createHttpsProxyAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected