Liking cljdoc? Tell your friends :D

std.lang.base.emit-data


default-map-keyclj

(default-map-key key grammar nsp)

emits a default map key

emits a default map key
raw docstring

emit-collclj

(emit-coll key form grammar mopts)
(emit-coll key form grammar mopts emit-fn)

emits a collection

emits a collection
raw docstring

emit-coll-layoutclj

(emit-coll-layout key indent str-array grammar mopts)

constructs the collection

constructs the collection
raw docstring

emit-dataclj

(emit-data key form grammar mopts)

main function for data forms

main function for data forms
raw docstring

emit-data-standardclj

(emit-data-standard key form grammar mopts)

emits either a custom string or default coll

emits either a custom string or default coll
raw docstring

emit-map-entryclj

(emit-map-entry [k v] grammar mopts)

emits the map entry

emits the map entry
raw docstring

emit-map-keyclj

(emit-map-key form grammar mopts)

emits the map key

emits the map key
raw docstring

emit-maybe-multibodyclj

(emit-maybe-multibody [prefix-yes prefix-no] body & [indent])

checks that array is all single lines

(emit-maybe-multibody ["1" "2"] "hello") => "2hello"

(emit-maybe-multibody ["1" "2"] "\nhello") => "1 \n hello"

checks that array is all single lines

(emit-maybe-multibody ["1" "2"] "hello")
=> "2hello"

(emit-maybe-multibody ["1" "2"] "\nhello")
=> "1  \n  hello"
raw docstring

emit-quoteclj

(emit-quote key props [sym & args :as form] grammar mopts)

emit quote structures

(emit-quote nil nil ''(1 2 3) +grammar+ {}) => "(1,2,3)"

emit quote structures

(emit-quote nil nil ''(1 2 3) +grammar+ {})
=> "(1,2,3)"
raw docstring

emit-singleline-array?clj

(emit-singleline-array? body-arr)

checks that array is all single lines

(emit-singleline-array? ["1" "2" "3"]) => true

(emit-singleline-array? ["1" "\n2" "3"]) => false

checks that array is all single lines

(emit-singleline-array? ["1" "2" "3"])
=> true

(emit-singleline-array? ["1" "\n2" "3"])
=> false
raw docstring

emit-tableclj

(emit-table _ _ [_ & args] grammar mopts)

emit quote structures

(emit-table nil nil '(tab :a 1 :b 2) +grammar+ {}) => "{"a":1,"b":2}"

emit quote structures

(emit-table nil nil '(tab :a 1 :b 2) +grammar+ {})
=> "{\"a\":1,\"b\":2}"
raw docstring

emit-table-groupclj

(emit-table-group args)

gets table group

(emit-table-group [:a 1 :b 2 :c :d])

gets table group

(emit-table-group [:a 1 :b 2 :c :d])
raw docstring

test-data-emitclj

(test-data-emit form grammar mopts)

test-data-loopclj

(test-data-loop form grammar mopts)

emit for data structures

(test-data-loop '[(+ 1 2)] +grammar+ {}) => "[(+ 1 2)]"

(test-data-loop '{:a (+ 1 2)} +grammar+ {}) => "{[:a (+ 1 2)]}"

(test-data-loop '#{(+ 1 2)} +grammar+ {}) => throws

[:quote] (test-data-loop ''((+ A B) C) +grammar+ {}) => "((+ A B),C)"

(test-data-loop ''[(+ A B) C] +grammar+ {}) => "(+ A B),C"

[:table] (test-data-loop '(tab :a (+ 1 2) :b 2) +grammar+ {}) => "{"a":(+ 1 2),"b":2}"

(test-data-loop '(tab 1 (+ 1 2) 3 4 5) +grammar+ {}) => "{1,(+ 1 2),3,4,5}"

emit for data structures

(test-data-loop '[(+ 1 2)]
                      +grammar+
                      {})
=> "[(+ 1 2)]"

(test-data-loop '{:a (+ 1 2)}
                      +grammar+
                      {})
=> "{[:a (+ 1 2)]}"

(test-data-loop '#{(+ 1 2)}
                      +grammar+
                      {})
=> throws


[:quote]
(test-data-loop ''((+ A B) C)
                      +grammar+
                      {})
=> "((+ A B),C)"

(test-data-loop ''[(+ A B) C]
                      +grammar+
                      {})
=> "(+ A B),C"

[:table]
(test-data-loop '(tab :a (+ 1 2) :b 2)
                      +grammar+
                      {})
=> "{\"a\":(+ 1 2),\"b\":2}"

(test-data-loop '(tab 1 (+ 1 2) 3 4 5)
                      +grammar+
                      {})
=> "{1,(+ 1 2),3,4,5}"
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close