MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / parsePort

Function parsePort

src/cm/lsp/serverRegistry.ts:60–66  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

58}
59
60function parsePort(value: unknown): number | null {
61 const num = Number(value);
62 if (!Number.isFinite(num)) return null;
63 const int = Math.floor(num);
64 if (int !== num || int <= 0 || int > 65535) return null;
65 return int;
66}
67
68interface RawBridgeConfig {
69 kind?: string;

Callers 1

sanitizeBridgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected