(keep-vars vars namespaces)
(keep-vars vars namespaces coerce)
keeps the vars that are in the set of namespace
(keep-vars '#{x.y/a x.z/b} '#{x.y}) => '#{x.y/a}
keeps the vars that are in the set of namespace (keep-vars '#{x.y/a x.z/b} '#{x.y}) => '#{x.y/a}
(keywordize-keys m)
modifies the keys of a map to be a keyword
(keywordize-keys {"a" 1 "b" 2}) => {:b 2, :a 1}
modifies the keys of a map to be a keyword (keywordize-keys {"a" 1 "b" 2}) => {:b 2, :a 1}
(keywordize-links m)
modifies the keys of a map to be a keyword
(keywordize-links {"a" #{"c" "d"} "b" #{"e"}}) => {"b" #{:e}, "a" #{:c :d}}
modifies the keys of a map to be a keyword (keywordize-links {"a" #{"c" "d"} "b" #{"e"}}) => {"b" #{:e}, "a" #{:c :d}}
(namespace? var namespaces)
(namespace? var namespaces coerce)
figures out if the var is in one of the listed namespaces
(namespace? 'example.core/hello #{}) => false
(namespace? 'example.core/hello '#{example.core}) => true
figures out if the var is in one of the listed namespaces (namespace? 'example.core/hello #{}) => false (namespace? 'example.core/hello '#{example.core}) => true
(reverse-graph graph)
takes a call-graph and reverses the visulization of call
(def calls {:a #{:b :c :d} :b #{:c} :c #{:a} :d #{}})
(reverse-graph calls) => {:a #{:c}, :d #{:a}, :b #{:a}, :c #{:b :a}}
(-> calls reverse-graph reverse-graph) => calls
takes a call-graph and reverses the visulization of call (def calls {:a #{:b :c :d} :b #{:c} :c #{:a} :d #{}}) (reverse-graph calls) => {:a #{:c}, :d #{:a}, :b #{:a}, :c #{:b :a}} (-> calls reverse-graph reverse-graph) => calls
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close