function getEventListeners(target, eventName) {
  if (!events[target]) {
    events[target] = {};
  }

  if (!events[target][eventName]) {
    events[target][eventName] = {
      outsideListener: getOutsideListener(eventName, target),
      otherListeners: [],
    };

    objectSpace[target][eventName] = triggerEvent.bind(null, target, eventName);
  }

  return events[target][eventName];
}
Gets an object containing all the listeners for an event of a target

@param target the target id
@param eventName the event name