{"size": 581, "ext": "js", "max_stars_repo_path": "src/components/Search/Utils/SearchUtils.js", "max_stars_repo_name": "atcult/ui-cataloging", "max_stars_repo_stars_event_min_datetime": "2021-04-07T11:28:37.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-07T11:28:37.000Z", "max_issues_repo_path": "src/components/Search/Utils/SearchUtils.js", "max_issues_repo_name": "atcult/ui-cataloging", "max_issues_repo_issues_event_min_datetime": "2018-07-27T06:50:08.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-27T06:50:08.000Z", "max_forks_repo_path": "src/components/Search/Utils/SearchUtils.js", "max_forks_repo_name": "atcult/ui-cataloging", "max_forks_repo_forks_event_min_datetime": "2018-10-22T11:31:24.000Z", "max_forks_repo_forks_event_max_datetime": "2018-10-22T11:31:24.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 22.3461538462, "max_line_length": 76, "alphanum_fraction": 0.65232358}
import { languageFilterMap, formatFilterMap } from '../Select/FilterMapper';

const getLanguageFilterQuery = (languageFilter) => {
  return languageFilter
    .map(e => {
      return 'LAN "' + languageFilterMap[Object.keys(e)[0]] + '"';
    }).join(' OR ');
};

const getFormatFilterQuery = (formatFilter) => {
  return formatFilter
    .map(e => {
      return formatFilterMap[Object.keys(e)[0]];
    }).join(' OR ');
};

const isAuthorityRecord = (meta) => {
  return meta.recordView === -1;
};

export {
  getLanguageFilterQuery,
  getFormatFilterQuery,
  isAuthorityRecord
};
