(derive-composite k)
Derives a the keys of the composite key k
from left to right.
For exmaple:
(it/derive-composite [:race/human :entity/aragorn :aragorn/age])
is equivalent to calling:
(derive :entity/aragorn :race/human)
(derive :aragorn/age :entity/aragorn)
Derives a the keys of the composite key `k` from left to right. For exmaple: ```clojure (it/derive-composite [:race/human :entity/aragorn :aragorn/age]) ``` is equivalent to calling: ```clojure (derive :entity/aragorn :race/human) (derive :aragorn/age :entity/aragorn) ```
(derive-hierarchy hierarchy)
Derive keys using a hierarchy structure.
For example:
(it/derive-hierarchy
{:entity/thranduil [:race/elf]
:entity/legolas [:race/elf]
:entity/aragorn [:race/human]})
Is equivalent to calling:
(derive :entity/thranduil :race/elf)
(derive :entity/legolas :race/elf)
(derive :entity/aragorn :race/human)
Derive keys using a hierarchy structure. For example: ```clojure (it/derive-hierarchy {:entity/thranduil [:race/elf] :entity/legolas [:race/elf] :entity/aragorn [:race/human]}) ``` Is equivalent to calling: ```clojure (derive :entity/thranduil :race/elf) (derive :entity/legolas :race/elf) (derive :entity/aragorn :race/human) ```
(derive-unknown config multi-method new-key)
Derives any keys in config
that aren't implemented in multi-method
with
new-key
. Any keys that are derived using this function will be returned in
a vector.
Derives any keys in `config` that aren't implemented in `multi-method` with `new-key`. Any keys that are derived using this function will be returned in a vector.
(find-derived-key config k)
Return the first key in config
that is derived from k
.
Return the first key in `config` that is derived from `k`.
(find-derived-keys config k)
Return all keys in config
that are derived from k
.
Return all keys in `config` that are derived from `k`.
(find-derived-value config k)
Return the value of the first key in config
that is derived from k
.
Return the value of the first key in `config` that is derived from `k`.
(find-derived-values config k)
Return all values of keys in config
that are derived from k
.
Return all values of keys in `config` that are derived from `k`.
(meta-init config)
(meta-init config keys)
Same as ig/init, but any metadata in a key's opts
are merged into the
resulting value after initialization. This is useful if your init-key returns
a function, but you want to add extra context to it.
Same as ig/init, but any metadata in a key's `opts` are merged into the resulting value after initialization. This is useful if your init-key returns a function, but you want to add extra context to it.
(meta-opts-init config)
(meta-opts-init config keys)
Same as ig/init, but opts
is merged into the resulting value's
metadata after initialization. This is useful if your init-key
returns a function, but you want to add extra context to it.
Same as ig/init, but `opts` is merged into the resulting value's metadata after initialization. This is useful if your init-key returns a function, but you want to add extra context to it.
(meta-opts-resume config system)
(meta-opts-resume config system keys)
Same as ig/resume, but opts
is merged into the resulting value's
metadata after initialization. This is useful if your resume-key
returns a function, but you want to add extra context to it.
Same as ig/resume, but `opts` is merged into the resulting value's metadata after initialization. This is useful if your resume-key returns a function, but you want to add extra context to it.
Useful Integrant readers
it/regex
Convert a string to a regex
{:regex/email? #it/regex ".+\@.+\..+"
...}
it/str
Convert a collection of strings into a single string
{:lotr/quote #it/str
["One ring to rule them all,"
"One ring to find them,"
"One ring to bring them all and in the darkness bind them"]
...}
Useful Integrant readers ## `it/regex` Convert a string to a regex ```clojure {:regex/email? #it/regex ".+\@.+\..+" ...} ``` ## `it/str` Convert a collection of strings into a single string ```clojure {:lotr/quote #it/str ["One ring to rule them all," "One ring to find them," "One ring to bring them all and in the darkness bind them"] ...} ```
(select-keys config keys)
Select all keys from config
that are a dependency if keys
Select all keys from `config` that are a dependency if `keys`
(underive-all config)
Underives all keys from config
of their parents. This is useful if you've
manually used derive
on keys within your config and need to remove them to
prevent ambiguous init-keys.
Underives all keys from `config` of their parents. This is useful if you've manually used `derive` on keys within your config and need to remove them to prevent ambiguous init-keys.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close