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

Function mergeStringConstraints

packages/effect/src/Arbitrary.ts:663–669  ·  view source on GitHub ↗
(c1: StringConstraints, c2: StringConstraints)

Source from the content-addressed store, hash-verified

661}
662
663function mergeStringConstraints(c1: StringConstraints, c2: StringConstraints): StringConstraints {
664 return makeStringConstraints({
665 minLength: getMax(c1.constraints.minLength, c2.constraints.minLength),
666 maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength),
667 pattern: mergePattern(c1.pattern, c2.pattern)
668 })
669}
670
671function buildStringConstraints(description: StringKeyword): StringConstraints | undefined {
672 return description.constraints.length === 0

Callers

nothing calls this directly

Calls 4

makeStringConstraintsFunction · 0.85
getMaxFunction · 0.85
getMinFunction · 0.85
mergePatternFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…