function initializeEventConfig(config) {
    const events = extend({
      defaults: {}
    }, config);
    const unpack = (obj, keys) => {
      keys.forEach(k => {
        if (isArray(obj[k])) obj[k] = toSet(obj[k]);
      });
    };
    unpack(events.defaults, ['prevent', 'allow']);
    unpack(events, ['view', 'window', 'selector']);
    return events;
  }
Initialize event handling configuration.
@param {object} config - The configuration settings.
@return {object}