code: function toBitMask(event) {
      if (!_.has(eventMap, event)) {
          throw new Error('Unkown event: ' + event);
      }
      return eventMap[event];
  }
docs: Convert a string to the corresponding bit mask.  event - String  Returns a binary number.