(minCodePoints: number, annotations?: Annotations.Filter)
| 8679 | * @since 4.0.0 |
| 8680 | */ |
| 8681 | export function isMinCodePoints(minCodePoints: number, annotations?: Annotations.Filter) { |
| 8682 | minCodePoints = normalizeCardinality(minCodePoints) |
| 8683 | return makeFilter<string>( |
| 8684 | (input) => countCodePointsUpTo(input, minCodePoints) >= minCodePoints, |
| 8685 | { |
| 8686 | expected: `a string with at least ${minCodePoints} code points`, |
| 8687 | representation: { |
| 8688 | id: "effect/schema/isMinCodePoints", |
| 8689 | payload: { minCodePoints } |
| 8690 | }, |
| 8691 | toJsonSchema: () => ({ minLength: minCodePoints }), |
| 8692 | arbitraryConstraint: { minCodePoints }, |
| 8693 | ...annotations |
| 8694 | } |
| 8695 | ) |
| 8696 | } |
| 8697 | /** |
| 8698 | * Validates that a string contains at most the specified number of Unicode code points. |
| 8699 | * |
nothing calls this directly
no test coverage detected