1.2.0 • Published 1 year ago
eumvoluptatem v1.2.0
vet
A collection of data validation tools.
major changes in vet 5
version 5 includes several breaking changes from version 4, mostly designed to improve interoperability with TS
optional
no longer acceptsnull
, justundefined
. This is to bring it inline with TypeScript and many other libraries' interpretation of optional values.isShape
now converts allT | undefined
properties to optional properties in the validator schema type. This eliminates the requirement to explicitly define "optional" properties asundefined
.accepts
andreturns
have now been moved fromvet/utils
tovet/functions
, where they should have been in the first place.
in addition, v5 includes:
- a new
isTuple
utility
API
{{>main}}