code: function createEvent(config) {
    const { type, target } = config;
    const eventObject = new Event(type);
  
    if (target) {
      eventObject.target = target;
      eventObject.srcElement = target;
      eventObject.currentTarget = target;
    }
  
    return eventObject;
  }
docs: /*
  Creates an Event object and extends it to allow full modification of
  its properties.
  
  @param {object} config - within config you will need to pass type and optionally target