Skip to content

v4.3.0

Compare
Choose a tag to compare
@sylvainpolletvillard sylvainpolletvillard released this 22 Jul 10:09
· 107 commits to master since this release
  • Performance improvement: every autocasted model now bypass its second validation step
  • Added a CHECK_ONCE mode as a second argument to object models constructors, that only validates the data once at model instanciation:
const Address = Model({ city: String, street: { name: String, number: Number }})
const a = new Address({ city: "Paris", street: { name: "Champs-Elysees", number: 12 }}, Model.CHECK_ONCE)

This feature has been asked to deal with specific performance issues, in situations where disabling ObjectModel completely is complicated or not desirable. This is not supposed to be a common usecase.