MCPcopy Index your code
hub / github.com/Effect-TS/effect / nonEmptyString

Function nonEmptyString

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

Source from the content-addressed store, hash-verified

522
523/** @internal */
524export const nonEmptyString = (name?: string): Config.Config<string> => {
525 const config = primitive(
526 "a non-empty text property",
527 Either.liftPredicate((text) => text.length > 0, () => configError.MissingData([], "Expected a non-empty string"))
528 )
529
530 return name === undefined ? config : nested(config, name)
531}
532
533/** @internal */
534export 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