MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / parseAllowedHostArgs

Function parseAllowedHostArgs

apps/kimi-code/src/cli/sub/server/shared.ts:95–101  ·  view source on GitHub ↗
(raw: readonly string[] | undefined)

Source from the content-addressed store, hash-verified

93}
94
95export function parseAllowedHostArgs(raw: readonly string[] | undefined): string[] {
96 if (raw === undefined) return [];
97 return raw
98 .flatMap((entry) => entry.split(','))
99 .map((entry) => entry.trim())
100 .filter((entry) => entry.length > 0);
101}
102
103function parseHost(raw: string | boolean | undefined): string {
104 if (raw === undefined || raw === false) return DEFAULT_SERVER_HOST;

Callers 2

server.test.tsFile · 0.85
parseServerOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected