Packages

yup

1.7.1 · 21 Sep 2025MIT16.7M / weekRepositorynpmAtom feed

Your version

0.6.0

8 Apr 2015Where it was published

0.32.11 is the newest release of 0.6.x.

In short

1 removed1 new4 changed

  • removed

    Removed the extend and create methods. Use whatever javascript inheritance patterns you want instead.

Release note

breaking

  • removed

    Removed the extend and create methods. Use whatever javascript inheritance patterns you want instead.

  • The resolution order of defaults and coercions has changed. as well as the general handling of null values.

    • Number: null will coerce to false when nullable() is not specified. NaN values will now fail isType() checks

    • String: null will coerce to '' when nullable() is not specified

    • Date: 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 fail isType() 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 for oneOf