Liking cljdoc? Tell your friends :D

std.pretty.edn


class->ednclj

(class->edn c)

converts a type to edn

(class->edn (type (byte-array []))) => "[B"

(class->edn (type (into-array String []))) => "[Ljava.lang.String;"

(class->edn (type :keyword)) => 'clojure.lang.Keyword

converts a type to edn

(class->edn (type (byte-array [])))
=> "[B"

(class->edn (type (into-array String [])))
=> "[Ljava.lang.String;"

(class->edn (type :keyword))
=> 'clojure.lang.Keyword
raw docstring

ednclj

(edn x)

converts an object to a tagged literal

(edn 1) => 1

(edn nil) => nil

(edn (java.lang.ClassLoader/getPlatformClassLoader)) => clojure.lang.TaggedLiteral

converts an object to a tagged literal

(edn 1)
=> 1

(edn nil)
=> nil

(edn (java.lang.ClassLoader/getPlatformClassLoader))
=> clojure.lang.TaggedLiteral
raw docstring

format-dateclj

(format-date v x)

helper function for formatting date

helper function for formatting date
raw docstring

override?clj

(override? x)

implements std.pretty.protocol/IOverride

implements `std.pretty.protocol/IOverride`
raw docstring

tagged-objectclj

(tagged-object o rep)

converts a type to a tagged literal

(tagged-object (java.lang.ClassLoader/getPlatformClassLoader) :classloader) ;;=> #object [jdk.internal.loader.ClassLoaders$PlatformClassLoader "0x73698a00" :classloader] => clojure.lang.TaggedLiteral

converts a type to a tagged literal

(tagged-object (java.lang.ClassLoader/getPlatformClassLoader) :classloader)
;;=> #object [jdk.internal.loader.ClassLoaders$PlatformClassLoader "0x73698a00" :classloader]
=> clojure.lang.TaggedLiteral
raw docstring

visitclj

(visit visitor x)

a extensible walker for printing `edn`` data

(visit (printer/canonical-printer) (Thread/currentThread)) => (contains-in [:span "#object" " " [:group "[" [:align coll?] "]"]])

a extensible walker for printing `edn`` data

(visit (printer/canonical-printer)
       (Thread/currentThread))
=> (contains-in [:span "#object" " " [:group "[" [:align coll?] "]"]])
raw docstring

visit-ednclj

(visit-edn visitor x)

creates a form for a non-edn element

(visit-edn (printer/canonical-printer) (doto (java.util.ArrayList.) (.add 1) (.add 2) (.add 3))) => [:group "[" [:align ["1" " " "2" " " "3"]] "]"]

creates a form for a non-edn element

(visit-edn (printer/canonical-printer)
           (doto (java.util.ArrayList.)
             (.add 1)
             (.add 2)
             (.add 3)))
=> [:group "[" [:align ["1" " " "2" " " "3"]] "]"]
raw docstring

visit-metaclj

(visit-meta visitor meta x)

creates a form for a meta (visit-meta (printer/canonical-printer) {:a 1} {}) => [:group "{" [:align ()] "}"]

creates a form for a meta
(visit-meta (printer/canonical-printer)
            {:a 1} {})
=> [:group "{" [:align ()] "}"]
raw docstring

visit-seqclj

(visit-seq visitor x)

creates a form for a seq

(visit-seq (printer/canonical-printer) [1 2 3 4]) => [:group "(" [:align ["1" " " "2" " " "3" " " "4"]] ")"]

creates a form for a seq

(visit-seq (printer/canonical-printer)
           [1 2 3 4])
=> [:group "(" [:align ["1" " " "2" " " "3" " " "4"]] ")"]
raw docstring

visit-taggedclj

(visit-tagged visitor x)

creates a form for a tagged literal

(visit-tagged (printer/canonical-printer) (tagged-literal 'hello [1 2 3])) => [:span "#hello" " " [:group "[" [:align ["1" " " "2" " " "3"]] "]"]]

creates a form for a tagged literal

(visit-tagged (printer/canonical-printer)
              (tagged-literal 'hello [1 2 3]))
=> [:span "#hello" " " [:group "[" [:align ["1" " " "2" " " "3"]] "]"]]
raw docstring

visit-unknownclj

(visit-unknown visitor x)

creatse a form for an unknown element

(visit-unknown (printer/canonical-printer) (Thread/currentThread)) => (throws)

creatse a form for an unknown element

(visit-unknown (printer/canonical-printer)
               (Thread/currentThread))
=> (throws)
raw docstring

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

× close