Liking cljdoc? Tell your friends :D

hiccup-templating.core.walker


*max-depth*clj

When bound to a positive integer, expand throws once the recursion depth exceeds this value. nil (the default) means no limit.

When bound to a positive integer, `expand` throws once the recursion
depth exceeds this value. `nil` (the default) means no limit.
sourceraw docstring

expandclj

(expand node data)

Walks node, resolving :data/... lookups and tagged-literal directives against data. Returns either the expanded structure or one of the sentinels declared above. Callers normally hand the result to template-to-hiccup, which strips trailing sentinels.

Honours *max-depth*: throws ex-info if the walker's recursion depth exceeds the bound value.

Walks `node`, resolving `:data/...` lookups and tagged-literal
directives against `data`. Returns either the expanded structure or
one of the sentinels declared above. Callers normally hand the
result to `template-to-hiccup`, which strips trailing sentinels.

Honours `*max-depth*`: throws `ex-info` if the walker's recursion
depth exceeds the bound value.
sourceraw docstring

template-to-hiccupclj

(template-to-hiccup template
                    data
                    &
                    {:keys [template-key max-depth]
                     :or {template-key :template}})

Top-level entry point. Resolves the template-key slot of template against data. Returns nil when the entire template prunes away.

Options: :template-key k - override which template slot to expand. Defaults to :template. :max-depth n - throw ex-info when the walker recurses more than n levels deep. Opt-in - nil (default) means no limit.

Top-level entry point. Resolves the `template-key` slot of `template`
against `data`. Returns nil when the entire template prunes away.

Options:
  `:template-key k` - override which template slot to expand.
                       Defaults to `:template`.
  `:max-depth n`    - throw `ex-info` when the walker recurses more
                       than `n` levels deep. Opt-in - nil (default)
                       means no limit.
sourceraw 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