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

Function parseOptionalNonEmptyString

src/node/config.ts:127–134  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

125}
126
127function parseOptionalNonEmptyString(value: unknown): string | undefined {
128 if (typeof value !== "string") {
129 return undefined;
130 }
131
132 const trimmed = value.trim();
133 return trimmed ? trimmed : undefined;
134}
135
136function parseOptionalEnvBoolean(value: unknown): boolean | undefined {
137 if (typeof value !== "string") {

Callers 5

loadConfigOrDefaultMethod · 0.85
saveConfigMethod · 0.85
getMdnsServiceNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected