docs: function validate() {
  
      logger.logEnter('validate');
  
      for (var i = 0; i < buffer.length; i++) {
  
        var eventData = buffer[i],
          typeName = eventData[0],
          typeKeys = eventTypes[typeName];
  
        if (!typeKeys) {
  
          emitter.emit('error', typeName + ' is not a known event type.');
  
          // Remove these events.
          eventCount -= eventData.length - 1;
          buffer.splice(i, 1);
          i--;
  
        } else {
  
          for (var j = 1; j < eventData.length; j++) {
  
            if (!validEvent(Object.keys(eventData[j]), typeKeys, emitter, typeName)) {
  
              // Remove this event.
              eventCount--;
              if (eventData.length === 2) {
                buffer.splice(i, 1);
                i--;
                break;
              } else {
                eventData.splice(j, 1);
                j--;
              }
            }
          }
        }
      }
  
      logger.logExit('validate');
    }