(aliasfn alias & forms)
Define a function to use as an alias function. Creates a function that wraps returned hiccup with debugging meta data when Replicant asserts are enabled (e.g. during development). When asserts are not enabled (default for production builds), creates a regular function with no added overhead.
aliasfn
is most commonly used through defalias
Define a function to use as an alias function. Creates a function that wraps returned hiccup with debugging meta data when Replicant asserts are enabled (e.g. during development). When asserts are not enabled (default for production builds), creates a regular function with no added overhead. `aliasfn` is most commonly used through `defalias`
(defalias alias & forms)
Creates a function to render alias
(a namespaced keyword), and registers
it in the global registry. See aliasfn
for details about the created function.
The global registry is available through replicant.alias/get-registered-aliases
.
Creates a function to render `alias` (a namespaced keyword), and registers it in the global registry. See `aliasfn` for details about the created function. The global registry is available through `replicant.alias/get-registered-aliases`.
(expand hiccup & [opt])
Recursively expand all aliases in hiccup
. The result will not contain
aliases. If using aliases that are not in the global registry, pass :aliases
in opt
.
Recursively expand all aliases in `hiccup`. The result will not contain aliases. If using aliases that are not in the global registry, pass `:aliases` in `opt`.
(expand-1 hiccup & [opt])
Expand the first level of aliases in hiccup
. The result may contain aliases
if returned by the top-level aliases. If using aliases that are not in the
global registry, pass :aliases
in opt
.
Expand the first level of aliases in `hiccup`. The result may contain aliases if returned by the top-level aliases. If using aliases that are not in the global registry, pass `:aliases` in `opt`.
(get-registered-aliases)
Returns globally registered aliases
Returns globally registered aliases
(register! k f)
Register an alias. Associates the alias key k
with the function f
:
(replicant.alias/register! :ui/a custom-link)
Register an alias. Associates the alias key `k` with the function `f`: ```clj (replicant.alias/register! :ui/a custom-link) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close