debian-mirror-gitlab/app/assets/javascripts/ref/stores/getters.js

6 lines
294 B
JavaScript
Raw Normal View History

2020-07-28 23:09:34 +05:30
/** 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;