MCPcopy Create free account
hub / github.com/Effect-TS/effect / nonEmptyString

Function nonEmptyString

packages/tools/openapi-generator/src/Utils.ts:68–75  ·  view source on GitHub ↗
(a: unknown)

Source from the content-addressed store, hash-verified

66 * @since 4.0.0
67 */
68export const nonEmptyString = (a: unknown): string | undefined => {
69 if (typeof a === "string") {
70 const trimmed = String.trim(a)
71 if (String.isNonEmpty(trimmed)) {
72 return trimmed
73 }
74 }
75}
76
77/**
78 * Renders an optional description as a JSDoc block for generated TypeScript.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected