API reference / @evolu/common / Type / trimmed
Variable: trimmed
const trimmed: BrandFactory<"Trimmed", string, TrimmedError>;
Defined in: packages/common/src/Type.ts:1141
Trimmed string.
This Type Factory validates whether a string has no leading or trailing whitespaces.
Example
const TrimmedNonEmptyString = trimmed(minLength(1)(String));
// string & Brand<"MinLength1"> & Brand<"Trimmed">
type TrimmedNonEmptyString = typeof TrimmedNonEmptyString.Type;