Liking cljdoc? Tell your friends :D

malli.util


-applyingclj/s

(-applying f)
source

-map-syntax-walkerclj/s

(-map-syntax-walker schema _ children _)
source

-mergeclj/s

(-merge)
source

-reducingclj/s

(-reducing f)
source

-required-map-entry?clj/s

(-required-map-entry? [_ ?p])
source

-select-keysclj/s

(-select-keys)
source

-simplify-map-entryclj/s

(-simplify-map-entry [k ?p s])
source

-unionclj/s

(-union)
source

-util-schemaclj/s

(-util-schema {:keys [type min max childs type-properties fn] :as opts})
source

assocclj/s

(assoc ?schema key value)
(assoc ?schema key value options)

Like [[clojure.core/assoc]], but for LensSchemas.

Like [[clojure.core/assoc]], but for LensSchemas.
sourceraw docstring

assoc-inclj/s

(assoc-in ?schema ks value)
(assoc-in ?schema [k & ks] value options)

Like [[clojure.core/assoc-in]], but for LensSchemas.

Like [[clojure.core/assoc-in]], but for LensSchemas.
sourceraw docstring

closed-schemaclj/s

(closed-schema ?schema)
(closed-schema ?schema options)

Closes recursively all :map schemas by adding {:closed true} property, unless schema explicitely open with {:closed false}

Closes recursively all :map schemas by adding `{:closed true}`
property, unless schema explicitely open with `{:closed false}`
sourceraw docstring

dissocclj/s

(dissoc ?schema key)
(dissoc ?schema key options)

Like [[clojure.core/dissoc]], but for MapSchemas.

Like [[clojure.core/dissoc]], but for MapSchemas.
sourceraw docstring

distinct-byclj/s

(distinct-by f coll)

Returns a sequence of distict (f x) values)

Returns a sequence of distict (f x) values)
sourceraw docstring

findclj/s

(find ?schema k)
(find ?schema k options)

Like [[clojure.core/find]], but for MapSchemas.

Like [[clojure.core/find]], but for MapSchemas.
sourceraw docstring

find-firstclj/s

(find-first ?schema f)
(find-first ?schema f options)

Prewalks the Schema recursively with a 3-arity fn [schema path options], returns with and as soon as the function returns non-null value.

Prewalks the Schema recursively with a 3-arity fn [schema path options], returns with
and as soon as the function returns non-null value.
sourceraw docstring

from-map-syntaxclj/s

(from-map-syntax m)
(from-map-syntax {:keys [type properties children] :as m} options)
source

getclj/s

(get ?schema k)
(get ?schema k default)
(get ?schema k default options)

Like [[clojure.core/get]], but for LensSchemas.

Like [[clojure.core/get]], but for LensSchemas.
sourceraw docstring

get-inclj/s

(get-in ?schema ks)
(get-in ?schema ks default)
(get-in ?schema [k & ks] default options)

Like [[clojure.core/get-in]], but for LensSchemas.

Like [[clojure.core/get-in]], but for LensSchemas.
sourceraw docstring

in->pathsclj/s

(in->paths schema in)

Returns a vector of schema paths for a given Schema and value path

Returns a vector of schema paths for a given Schema and value path
sourceraw docstring

mergeclj/s

(merge ?schema1 ?schema2)
(merge ?schema1 ?schema2 options)

Merges two schemas into one with the following rules:

  • if either schemas is nil, the other one is used, regardless of value
  • with two :map schemas, both keys and values are merged
  • with two :map entries, :merge-entries fn is used (default last one wins)
  • with any other schemas, :merge-default fn is used (default last one wins)
keydescription
:merge-defaultschema1 schema2 options -> schema fn to merge unknown entries
:merge-requiredboolean boolean -> boolean fn to resolve how required keys are merged
Merges two schemas into one with the following rules:

* if either schemas is `nil`, the other one is used, regardless of value
* with two :map schemas, both keys and values are merged
* with two :map entries, `:merge-entries` fn is used (default last one wins)
* with any other schemas, `:merge-default` fn is used (default last one wins)

| key               | description
| ------------------|-------------
| `:merge-default`  | `schema1 schema2 options -> schema` fn to merge unknown entries
| `:merge-required` | `boolean boolean -> boolean` fn to resolve how required keys are merged
sourceraw docstring

open-schemaclj/s

(open-schema ?schema)
(open-schema ?schema options)

Closes recursively all :map schemas by removing :closed property, unless schema explicitely open with {:closed false}

Closes recursively all :map schemas by removing `:closed`
property, unless schema explicitely open with `{:closed false}`
sourceraw docstring

optional-keysclj/s

(optional-keys ?schema)
(optional-keys ?schema ?keys)
(optional-keys ?schema keys options)

Makes map keys optional.

Makes map keys optional.
sourceraw docstring

path->inclj/s

(path->in schema path)

Returns a value path for a given Schema and schema path

Returns a value path for a given Schema and schema path
sourceraw docstring

rename-keysclj/s

(rename-keys ?schema kmap)
(rename-keys ?schema kmap options)

Like [[clojure.set/rename-keys]], but for MapSchemas. Collisions are resolved in favor of the renamed key, like assoc-ing.

Like [[clojure.set/rename-keys]], but for MapSchemas. Collisions are resolved in favor of the renamed key, like `assoc`-ing.
sourceraw docstring

required-keysclj/s

(required-keys ?schema)
(required-keys ?schema ?keys)
(required-keys ?schema keys options)

Makes map keys required.

Makes map keys required.
sourceraw docstring

schemasclj/s

(schemas)
source

select-keysclj/s

(select-keys ?schema keys)
(select-keys ?schema keys options)

Like [[clojure.core/select-keys]], but for MapSchemas.

Like [[clojure.core/select-keys]], but for MapSchemas.
sourceraw docstring

subschemasclj/s

(subschemas ?schema)
(subschemas ?schema options)

Returns all subschemas for unique paths as a vector of maps with :schema, :path and :in keys. Walks over :schema references and top-level :refs. See [[malli.core/-walk]] for all options.

Returns all subschemas for unique paths as a vector of maps with :schema, :path and :in keys.
Walks over :schema references and top-level :refs. See [[malli.core/-walk]] for all options.
sourceraw docstring

to-map-syntaxclj/s

(to-map-syntax ?schema)
(to-map-syntax ?schema options)
source

transform-entriesclj/s

(transform-entries ?schema f options)

Transforms entries with f.

Transforms entries with f.
sourceraw docstring

unionclj/s

(union ?schema1 ?schema2)
(union ?schema1 ?schema2 options)

Union of two schemas. See merge for more details.

Union of two schemas. See [[merge]] for more details.
sourceraw docstring

updateclj/s

(update schema key f & args)

Like [[clojure.core/update]], but for LensSchema instances.

Like [[clojure.core/update]], but for LensSchema instances.
sourceraw docstring

update-inclj/s

(update-in schema ks f & args)

Like [[clojure.core/update-in]], but for LensSchemas.

Like [[clojure.core/update-in]], but for LensSchemas.
sourceraw docstring

update-propertiesclj/s

(update-properties schema f & args)

Returns a Schema instance with updated properties.

Returns a Schema instance with updated properties.
sourceraw docstring

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

× close