Welcome to mirror list, hosted at ThFree Co, Russian Federation.

view_types.js « image_diff « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ab0a595571fff30df246e87667a020b77c7bbe25 (plain)
1
2
3
4
5
6
7
8
9
export const viewTypes = {
  TWO_UP: 'TWO_UP',
  SWIPE: 'SWIPE',
  ONION_SKIN: 'ONION_SKIN',
};

export function isValidViewType(validate) {
  return !!Object.getOwnPropertyNames(viewTypes).find(viewType => viewType === validate);
}