yup
1.7.1 · 21 Sep 2025MIT16.7M / weekRepositorynpmAtom feed
0.32.11 is the newest release of 0.6.x.
In short
1 removed1 new4 changed
- removed
Removed the
extendandcreatemethods. Use whatever javascript inheritance patterns you want instead.
Release note
breaking
- removed
Removed the
extendandcreatemethods. Use whatever javascript inheritance patterns you want instead. The resolution order of defaults and coercions has changed. as well as the general handling of
nullvalues.Number:
nullwill coerce tofalsewhennullable()is not specified.NaNvalues will now failisType()checksString:
nullwill coerce to''whennullable()is not specifiedDate: Invalid dates will not be coerced to
null, but left as invalid date, This is probably not a problem for anyone as invalid dates will also failisType()checks
Default values are cloned everytime they are returned, so it is impossible to share references to defaults across schemas. No one should be doing that anyway
Stopped pretending that using schemas as conditions in
when()actually worked (it didn't)
other changes
transform()now passes the original value to each transformer. Allowing you to recover from a bad transform.Added the
equals()alias foroneOf