Liking cljdoc? Tell your friends :D

lucid.unit.zipper


append-nodeclj

(append-node zloc node)

Adds node as well as whitespace and newline on right

(-> (z/of-string "(+)") (z/down) (append-node 2) (append-node 1) (z/->root-string)) => "(+\n 1\n 2)"

Adds node as well as whitespace and newline on right

(-> (z/of-string "(+)")
    (z/down)
    (append-node 2)
    (append-node 1)
    (z/->root-string))
=> "(+\n  1\n  2)"
raw docstring

insertclj

(insert zloc nsp gathered)

inserts the meta information and docstring from tests

inserts the meta information and docstring from tests
raw docstring

nodes->docstringclj

(nodes->docstring nodes)

converts nodes to a docstring compatible (->> (z/of-string ""hello"\n (+ 1 2)\n => 3 ") (iterate z/right*) (take-while identity) (map z/node) (nodes->docstring) (node/string)) => ""hello\n (+ 1 2)\n => 3 ""

(->> (z/of-string (str [\e \d])) (iterate z/right*) (take-while identity) (map z/node) (nodes->docstring) (str) (read-string)) => "[\e \d]"

converts nodes to a docstring compatible
 (->> (z/of-string "\"hello\"\n  (+ 1 2)\n => 3 ")
      (iterate z/right*)
      (take-while identity)
      (map z/node)
      (nodes->docstring)
      (node/string))
 => ""hello\n  (+ 1 2)\n  => 3 ""

 (->> (z/of-string (str [\e \d]))
      (iterate z/right*)
      (take-while identity)
      (map z/node)
      (nodes->docstring)
      (str)
      (read-string))
=> "[\e \d]"
raw docstring

selectorclj

(selector)
(selector var)

builds a selector for functions

(selector 'hello) => '[(#{defn defmacro defmulti} | hello ^:%?- string? ^:%?- map? & _)]

builds a selector for functions

(selector 'hello)
=> '[(#{defn defmacro defmulti} | hello ^:%?- string? ^:%?- map? & _)]
raw docstring

strip-quotes-arrayclj

(strip-quotes-array arr)
(strip-quotes-array [x & more] p1 p2 out)

utility that strips quotes when not the result of a fact (strip-quotes-array [""hello""]) => ["hello"]

(strip-quotes-array ["(str "hello")" " " "=>" " " ""hello""]) => ["(str "hello")" " " "=>" " " ""hello""]

utility that strips quotes when not the result of a fact
(strip-quotes-array ["\"hello\""])
=> ["hello"]

(strip-quotes-array ["(str \"hello\")" " " "=>" " " "\"hello\""])
=> ["(str \"hello\")" " " "=>" " " "\"hello\""]
raw docstring

walk-fileclj

(walk-file file var references action-fn)

helper function for file manipulation used by import and purge

helper function for file manipulation used by import and purge
raw docstring

write-fileclj

(write-file zloc file)

exports the zipper contents to file

exports the zipper contents to file
raw docstring

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

× close