Superstruct v0.2.0 Release Notes

Release Date: 2017-11-30 // over 6 years ago
  • BREAKING
    • Structs are now functions again. :smile: They are built on the same underlying schema classes underneath though, since that helps the code structure. But to allow for the struct = Struct({ ... }) syntax the structs themselves have changed to be function.
    NEW
    • The basic case is now Struct(data). Previously you had to use Struct.assert(data). Although the assert method (and others) are still there, the basic case is a bit terser and more similar to the struct-initializing APIs in other languages.