code: function getRepeatMode(modeStr) {
      if (!modeStr) { return REPEAT_VIRTUAL; }
      modeStr = modeStr.toLowerCase();
      return  REPEAT_MODES.indexOf(modeStr) > -1 ? modeStr : REPEAT_VIRTUAL;
    }
docs: get a valid repeat mode from an md-mode attribute string.