Liking cljdoc? Tell your friends :D

integrant-tools.core


derive-compositeclj/s

(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)
```
sourceraw docstring

derive-hierarchyclj/s

(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)
```
sourceraw docstring

derive-unknownclj/s

(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.
sourceraw docstring

find-derived-keyclj/s

(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`.
sourceraw docstring

find-derived-keysclj/s

(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`.
sourceraw docstring

find-derived-valueclj/s

(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`.
sourceraw docstring

find-derived-valuesclj/s

(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`.
sourceraw docstring

meta-initclj/s

(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.
sourceraw docstring

meta-init-keyclj/s

(meta-init-key k opts)
source

meta-opts-initclj/s

(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.
sourceraw docstring

meta-opts-init-keyclj/s

(meta-opts-init-key k opts)
source

meta-opts-resumeclj/s

(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.
sourceraw docstring

meta-opts-resume-keyclj/s

(meta-opts-resume-key k opts old-value old-impl)
source

readersclj/s

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"]
 ...}
```
sourceraw docstring

select-keysclj/s

(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`
sourceraw docstring

underive-allclj/s

(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.
sourceraw docstring

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

× close