MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / stringArrayValue

Function stringArrayValue

projects/runtime-node/src/cli.ts:69–78  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

67}
68
69function stringArrayValue(value: string | undefined): string[] | undefined {
70 if (!value) return undefined
71 try {
72 const parsed = JSON.parse(value) as unknown
73 if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) return parsed
74 } catch {
75 // Fall through to whitespace splitting for local shell convenience.
76 }
77 return value.split(/\s+/).map((item) => item.trim()).filter(Boolean)
78}
79
80function readConfigFile(filePath: string | undefined): RuntimeNodeServeConfig {
81 if (!filePath) return {}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected