MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / parseStringArray

Function parseStringArray

src/server/config.ts:26–37  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

24}
25
26function parseStringArray(value: unknown): string[] | undefined {
27 if (!Array.isArray(value)) {
28 return undefined;
29 }
30
31 const parsed = value
32 .filter((entry): entry is string => typeof entry === 'string')
33 .map((entry) => entry.trim())
34 .filter((entry) => entry.length > 0);
35
36 return parsed.length > 0 ? parsed : undefined;
37}
38
39export async function loadServerConfig(): Promise<ServerConfig | null> {
40 const configPath =

Callers 1

loadServerConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected