Validate, sanitize and transform values with proper TypeScript types and zero dependencies.
Add objectMap()
.
Add discriminatedUnion()
.
This version introduces a breaking change: all validators and transformers now return Result<T>
instead of just T
to facilitate error handling without throwing errors. To facilitate transition from 2.x to 3.x you can use toThrow()
(see README).
toThrow()
#30.pipe()
#31.Rewrite with pure functional Either<Error, Result> pattern, see #29.