docs: function validate(message, type) {
    assert(
      typeOf(message) === 'object',
      'You must pass a message object.',
    );
  
    rules.forEach((rule) => {
      if (message[rule.name]) {
        const types = [].concat(rule.types);
  
        assert(
          types.some(t => typeOf(message[rule.name]) === t),
          `"${rule.name}" must be ${types.join(' or ')}.`,
        );
      }
    });
  
    if (asserts[type]) {
      asserts[type](message);
    } else {
      throw new TypeError('Invalid event type');
    }
  }