function areValidSortStates(sortStates) {
  if (Array.isArray(sortStates) === false || sortStates.every(function (columnState) {
    return (0, _object.isObject)(columnState);
  }) === false) {
    return false;
  }

  var sortedColumns = sortStates.map(function (_ref) {
    var column = _ref.column;
    return column;
  });
  var indexOccursOnlyOnce = new Set(sortedColumns).size === sortedColumns.length;
  return indexOccursOnlyOnce && sortStates.every(isValidColumnState);
}
Get if all sorted columns states are valid.

@param {Array} sortStates
@returns {Boolean}