MCPcopy
hub / github.com/coder/mux / parsePort

Function parsePort

scripts/with-storybook.ts:48–54  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

46}
47
48function parsePort(value: string): number {
49 const port = parsePositiveInteger(value, "--port");
50 if (port > 65_535) {
51 throw new Error(`--port must be <= 65535, got: ${value}`);
52 }
53 return port;
54}
55
56function parseArgs(argv: string[]): Options {
57 if (argv.includes("--help") || argv.includes("-h")) {

Callers 1

parseArgsFunction · 0.85

Calls 1

parsePositiveIntegerFunction · 0.70

Tested by

no test coverage detected