code: function dateComparators(props, propName) {
      if (!props[propName]) {
        return;
      }
      for (var i = 0; i < props[propName].length; i++) {
        var comparatorIsValid = false;
        for (var j = 0; j < legalComparators.length; j++) {
          if (legalComparators[j] === props[propName][i]) {
            comparatorIsValid = true;
            break;
          }
        }
        if (!comparatorIsValid) {
          return new Error('Date comparator provided is not supported.\n          Use only ' + legalComparators);
        }
      }
    }
docs: /* eslint consistent-return: 0