MCPcopy Index your code
hub / github.com/callstack/agent-device / normalizePort

Function normalizePort

src/utils/runtime-transport.ts:50–54  ·  view source on GitHub ↗
(value: number | undefined)

Source from the content-addressed store, hash-verified

48}
49
50function normalizePort(value: number | undefined): number | undefined {
51 if (!Number.isInteger(value)) return undefined;
52 if ((value as number) <= 0 || (value as number) > 65_535) return undefined;
53 return value;
54}
55
56function defaultPortForProtocol(protocol: string): number | undefined {
57 if (protocol === 'https:') return 443;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected