(annotations?: Annotations.Filter)
| 6655 | * |
| 6656 | * JSON Schema: |
| 6657 | * |
| 6658 | * This check corresponds to a `pattern` constraint in JSON Schema that |
| 6659 | * matches strings without leading or trailing whitespace. |
| 6660 | * |
| 6661 | * Arbitrary: |
| 6662 | * |
| 6663 | * When generating test data with fast-check, this applies a `patterns` |
| 6664 | * constraint to ensure generated strings match the trimmed pattern. |
| 6665 | * |
| 6666 | * @category validation |
| 6667 | * @since 4.0.0 |
| 6668 | */ |
| 6669 | export function isTrimmed(annotations?: Annotations.Filter) { |
| 6670 | const regExp = new globalThis.RegExp(TRIMMED_PATTERN) |
| 6671 | return makeFilter( |
| 6672 | (s: string) => s.trim() === s, |
nothing calls this directly
no test coverage detected
searching dependent graphs…