debian-mirror-gitlab/app/assets/javascripts/ref/stores/getters.js
2020-08-09 17:41:57 +05:30

5 lines
294 B
JavaScript

/** Returns `true` if the query string looks like it could be a commit SHA */
export const isQueryPossiblyASha = ({ query }) => /^[0-9a-f]{4,40}$/i.test(query);
/** Returns `true` if there is at least one in-progress request */
export const isLoading = ({ requestCount }) => requestCount > 0;