Schema.prototype.set()

Parameters
  • key «String» option name

  • [value] «Object» if not passed, the current option value is returned

Sets a schema option.

Example

  1. schema.set('strict'); // 'true' by default
  2. schema.set('strict', false); // Sets 'strict' to false
  3. schema.set('strict'); // 'false'