Superstruct v0.4.0 Release Notes
Release Date: 2017-12-01 // over 6 years ago-
BREAKING
object
structs are no longer optional-ish. Previously object struct types would not throw ifundefined
was passed and no properties were required. This was not only confusing, but complex to maintain. Now if you want an object struct to be optional, use thestruct.optional(...)
helper.✂ Removed the
Struct.default
method. If you need to get the default value, use theStruct.validate
orStruct.assert
methods's return value instead.
NEW
- ➕ Added the
dict
,enum
,intersection
,union
andtuple
structs. These are all available asstruct.dict
,struct.enum
, etc.