Add profiles-with-matching-meta

Function to return a sequence of profile keywords for all project
profiles with metadata matching a predicate.
This commit is contained in:
Hugo Duncan 2014-09-21 10:17:37 -04:00
parent 3150dc0fd8
commit 7baeb2bce5

View file

@ -905,6 +905,14 @@ Also merges default profiles."
(-> project meta :profile-inherited-meta))
(into {})))
(defn profiles-with-matching-meta
"Return a sequence of profile keywords for the project profiles that
have metadata that satisfies the predicate, pred."
[project pred]
(->> (-> project meta :profiles)
(filter (comp pred meta val))
(map key)))
(defn non-leaky-profiles
"Return a sequence of profile keywords for the non-leaky profiles
currently included in the project."