Structure
Structure v2
Structure v2
  • Introduction
  • Schema concept
    • Shorthand and complete attribute definition
    • Circular reference
    • Nullable attributes
  • Custom setters and getters
  • Coercion
    • Primitive type coercion
    • Arrays coercion
    • Generic coercion
    • Recursive coercion
    • Disabling coercion
  • Validation
    • String validations
    • Number validations
    • Boolean validations
    • Date validations
    • Array validations
    • Attribute reference
    • Nested validations
    • Validate raw data
  • Strict mode
  • Cloning an instance
  • Serialization
  • Testing
  • Battlecry generators
  • Migrating from v1
  • Support and compatibility
  • Changelog
  • Contributing
  • License
  • GitHub
Powered by GitBook
On this page
  • Node
  • Browser

Was this helpful?

Support and compatibility

PreviousMigrating from v1NextChangelog

Last updated 4 years ago

Was this helpful?

Structure is built on top of modern JavaScript, using new features like , and . That being so, there are some things regarding compatibility you should consider when using Structure.

Node

Node has only implemented all the used features at version 10, so to use Structure for a backend application you'll need Node 10 or later.

Browser

We have a UMD version for usage in browsers. Right now the tests are ran both in Node (using the original code) and in Electron (using the UMD version) and the whole test suite passes for both cases. Since we use modern JavaScript features inside the lib (like ), older browsers may not support it. Polyfilling them may be an option but it's not oficially supported.

Proxy
Reflect
Symbol
Proxy