summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/utils.js
blob: 2e08001f6b3c4cc71cdcd14c992ee174da01d1ef (plain)
1
2
3
4
5
6
7
import { pickBy } from 'lodash';
import { SUPPORTED_FILTER_PARAMETERS } from './constants';

// eslint-disable-next-line import/prefer-default-export
export const validateParams = params => {
  return pickBy(params, (val, key) => SUPPORTED_FILTER_PARAMETERS.includes(key) && val);
};