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

Function nonEmptyString

packages/effect/src/internal/config.ts:537–544  ·  view source on GitHub ↗
(name?: string)

Source from the content-addressed store, hash-verified

535
536/** @internal */
537export const nonEmptyString = (name?: string): Config.Config<string> => {
538 const config = primitive(
539 "a non-empty text property",
540 Either.liftPredicate((text) => text.length > 0, () => configError.MissingData([], "Expected a non-empty string"))
541 )
542
543 return name === undefined ? config : nested(config, name)
544}
545
546/** @internal */
547export const all = <const Arg extends Iterable<Config.Config<any>> | Record<string, Config.Config<any>>>(

Callers

nothing calls this directly

Calls 1

primitiveFunction · 0.85

Tested by

no test coverage detected