Liking cljdoc? Tell your friends :D

lucid.insight.pipeline


call-pipeclj

(call-pipe bundle {opts :bundle})

a pipeline for manipulation of elements based upon specific options:

(-> (bundle/bundle #"example") (call-pipe {:bundle {:reverse-calls false :hide-dynamic false :hide-namespaces #{} :hide-singletons false :hide-vars #{} :select-namespaces #{} :select-vars #{} :collapse-vars #{}}}))
=> {:example.core/keywordize #{:example.core/hash-map? :example.core/long?}, :example.core/long? #{}, :example.core/hash-map? #{}}

a pipeline for manipulation of elements based upon specific options:

(-> (bundle/bundle #"example")
    (call-pipe {:bundle {:reverse-calls     false
                         :hide-dynamic      false
                         :hide-namespaces   #{}
                         :hide-singletons   false
                         :hide-vars         #{}
                         :select-namespaces #{}
                        :select-vars       #{}
                         :collapse-vars     #{}}}))  
=> {:example.core/keywordize #{:example.core/hash-map? :example.core/long?},
    :example.core/long? #{},
    :example.core/hash-map? #{}}
raw docstring

css-stringclj

(css-string s)

creates a css-string from a clojure one

(css-string "clojure.core/add") => "clojure_core__add"

creates a css-string from a clojure one

(css-string "clojure.core/add")
=> "clojure_core__add"
raw docstring

elements-pipeclj

(elements-pipe calls opts)

creates elements from a call graph for display as dom elements

(-> (bundle/bundle #"example") (call-pipe viewer/+default-options+) (elements-pipe viewer/+default-options+)) => {:nodes {:example.core/keywordize {:full :example.core/keywordize, :label "c/keywordize", :namespace "example.core", :ui.class ["ns_example_core"]}, :example.core/long? {:full :example.core/long?, :label "c/long?", :namespace "example.core", :ui.class ["ns_example_core"]}, :example.core/hash-map? {:full :example.core/hash-map?, :label "c/hash-map?", :namespace "example.core", :ui.class ["ns_example_core"]}}, :edges {[:example.core/keywordize :example.core/hash-map?] {:from :example.core/keywordize, :to :example.core/hash-map?, :from-ns "example.core", :to-ns "example.core", :ui.class ["to_example_core" "from_example_core"]}, [:example.core/keywordize :example.core/long?] {:from :example.core/keywordize, :to :example.core/long?, :from-ns "example.core", :to-ns "example.core", :ui.class ["to_example_core" "from_example_core"]}}}

creates elements from a call graph for display as dom elements

(-> (bundle/bundle #"example")
    (call-pipe viewer/+default-options+)
    (elements-pipe viewer/+default-options+))
=> {:nodes {:example.core/keywordize
            {:full :example.core/keywordize,
             :label "c/keywordize",
            :namespace "example.core",
             :ui.class ["ns_example_core"]},
            :example.core/long?
            {:full :example.core/long?,
             :label "c/long?",
             :namespace "example.core",
             :ui.class ["ns_example_core"]},
            :example.core/hash-map?
            {:full :example.core/hash-map?,
             :label "c/hash-map?",
             :namespace "example.core",
             :ui.class ["ns_example_core"]}},
    :edges {[:example.core/keywordize :example.core/hash-map?]
            {:from :example.core/keywordize,
             :to :example.core/hash-map?,
             :from-ns "example.core",
             :to-ns "example.core",
             :ui.class ["to_example_core" "from_example_core"]},
            [:example.core/keywordize :example.core/long?]
            {:from :example.core/keywordize,
             :to :example.core/long?,
             :from-ns "example.core",
             :to-ns "example.core",
             :ui.class ["to_example_core" "from_example_core"]}}}
raw docstring

find-adjacentclj

(find-adjacent calls var)

returns a set of all functions adjacent to var

(find-adjacent {:a #{:b :c} :b #{}} :a) => #{:c :b}

returns a set of all functions adjacent to var

(find-adjacent {:a #{:b :c} :b #{}}
               :a)
=> #{:c :b}
raw docstring

find-downstreamclj

(find-downstream calls var)
(find-downstream calls var analysed out)

helper function for find-upstream and find-downstream

(find-downstream {:a #{:b :c} :b #{} :c #{:d} :d #{}} :a) => #{:c :b :d}

helper function for find-upstream and find-downstream

(find-downstream {:a #{:b :c} :b #{} :c #{:d} :d #{}}
                 :a)
=> #{:c :b :d}
raw docstring

find-downstream-varsclj

(find-downstream-vars calls vars)

returns a set of all dynamic vars within a call graph

(find-downstream-vars {:a #{} :b #{} :c #{:a}} #{:c :b}) => #{:a}

returns a set of all dynamic vars within a call graph

(find-downstream-vars {:a #{}
                       :b #{}
                       :c #{:a}}
                      #{:c :b})
=> #{:a}
raw docstring

find-dynamicclj

(find-dynamic calls)

returns a set of all dynamic vars within a call graph

(find-dynamic {:hello #{}}) => #{:hello}

returns a set of all dynamic vars within a call graph

(find-dynamic {:*hello* #{}})
=> #{:*hello*}
raw docstring

find-namespace-varsclj

(find-namespace-vars calls namespaces)

returns vars that are in a particular namespace

(find-namespace-vars {:x/b #{} :y/c #{} :z/a #{}} #{"x" "z"}) => #{:x/b :z/a}

returns vars that are in a particular namespace

(find-namespace-vars {:x/b #{}
                      :y/c #{}
                      :z/a #{}}
                     #{"x" "z"})
=> #{:x/b :z/a}
raw docstring

find-singletonsclj

(find-singletons calls)

returns a set a isolated nodes

(find-singletons {:a #{} :b #{} :c #{:a}}) => #{:b}

returns a set a isolated nodes

(find-singletons {:a #{}
                  :b #{}
                  :c #{:a}})
=> #{:b}
raw docstring

pick-varsclj

(pick-vars calls vars)

picks only those references from the call graph

(pick-vars {:a #{:b} :b #{:a} :c #{:a :b}} #{:a :b}) => {:a #{:b}, :b #{:a}}

picks only those references from the call graph

(pick-vars {:a #{:b}
            :b #{:a}
            :c #{:a :b}} #{:a :b})
=> {:a #{:b}, :b #{:a}}
raw docstring

remove-varsclj

(remove-vars calls vars)

removes all references of var from call graph

(remove-vars {:a #{:b} :b #{:a} :c #{:a :b}} #{:a}) => {:b #{}, :c #{:b}}

removes all references of var from call graph

(remove-vars {:a #{:b}
              :b #{:a}
              :c #{:a :b}} #{:a})
=> {:b #{}, :c #{:b}}
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close