Liking cljdoc? Tell your friends :D

malli.core


-and-schemaclj/s

(-and-schema)
source

-boolean-fnclj/s

(-boolean-fn x)
source

-boolean-schemaclj/s

(-boolean-schema)
source

-check-children!clj/s

(-check-children! type properties children {:keys [min max] :as opts})
source

-collection-schemaclj/s

(-collection-schema {type :type
                     fpred :pred
                     fempty :empty
                     fin :in
                     :or {fin (fn [i _] i)}
                     :as opts})
source

-compclj/s

(-comp)
(-comp f)
(-comp f g)
(-comp f g h)
(-comp f1 f2 f3 & fs)
source

-create-formclj/s

(-create-form type properties children)
source

-default-sci-optionsclj/s

(-default-sci-options)
source

-double-schemaclj/s

(-double-schema)
source

-enum-schemaclj/s

(-enum-schema)
source

-errorclj/s

source

-fail!clj/s

source

-fn-schemaclj/s

(-fn-schema)
source

-function-schemaclj/s

(-function-schema)
source

-get-entriesclj/s

(-get-entries schema key default)
source

-guardclj/s

(-guard pred tf)
source

-inner-entriesclj/s

(-inner-entries walker path entries options)
source

-inner-indexedclj/s

(-inner-indexed walker path children options)
source

-int-schemaclj/s

(-int-schema)
source

-interceptingclj/s

(-intercepting {:keys [enter leave]})
(-intercepting {:keys [enter leave] :as interceptor} f)
source

-into-transformerclj/s

(-into-transformer x)
source

-invalid?clj/s

(-invalid? x)
source

-keyword->stringclj/s

(-keyword->string x)
source

-keyword-schemaclj/s

(-keyword-schema)
source

-lazyclj/s

(-lazy ref options)
source

-map-of-schemaclj/s

(-map-of-schema)
source

-map-schemaclj/s

(-map-schema)
(-map-schema opts)
source

-maybe-schemaclj/s

(-maybe-schema)
source

-memoizeclj/s

(-memoize f)
source

-min-max-predclj/s

(-min-max-pred f)
source

-multi-schemaclj/s

(-multi-schema)
(-multi-schema opts)
source

-or*-schemaclj/s

(-or*-schema)
source

-or-schemaclj/s

(-or-schema)
source

-parent-children-transformerclj/s

(-parent-children-transformer parent children transformer method options)
source

-parse-entriesclj/s

(-parse-entries children {:keys [naked-keys lazy-refs]} options)
source

-pointerclj/s

(-pointer id schema options)
source

-properties-and-optionsclj/s

(-properties-and-options properties options f)
source

-qualified-keyword-predclj/s

(-qualified-keyword-pred properties)
source

-qualified-keyword-schemaclj/s

(-qualified-keyword-schema)
source

-qualified-symbol-schemaclj/s

(-qualified-symbol-schema)
source

-re-schemaclj/s

(-re-schema class?)
source

-ref-schemaclj/s

(-ref-schema)
(-ref-schema {:keys [lazy type-properties] :as opts})
source

-reference?clj/s

(-reference? ?schema)
source

-register-=>schema!clj/s

(-register-=>schema! ns name value)
source

-registryclj/s

(-registry)
(-registry {:keys [registry]})
source

-safe-predclj/s

(-safe-pred f)
source

-schema-schemaclj/s

(-schema-schema {:keys [id raw] :as opts})
source

-sequence-entry-schemaclj/s

(-sequence-entry-schema {:keys [type child-bounds re-validator re-explainer
                                re-parser re-transformer]
                         :as opts})
source

-sequence-schemaclj/s

(-sequence-schema {:keys [type child-bounds re-validator re-explainer re-parser
                          re-transformer]
                   :as opts})
source

-set-assoc-childrenclj/s

(-set-assoc-children schema key value)
source

-set-childrenclj/s

(-set-children schema children)
source

-set-entriesclj/s

(-set-entries schema key value)
source

-simple-schemaclj/s

(-simple-schema ?props)
source

-string-schemaclj/s

(-string-schema)
source

-symbol-schemaclj/s

(-symbol-schema)
source

-tuple-schemaclj/s

(-tuple-schema)
source

-updateclj/s

(-update m k f)
source

-uuid-schemaclj/s

(-uuid-schema)
source

-val-schemaclj/s

(-val-schema)
(-val-schema schema properties)
source

=>clj/smacro

(=> name value)
source

=>schemaclj/s

(=>schema ?schema)
(=>schema ?schema options)
source

=>schemasclj/s

(=>schemas)
source

base-schemasclj/s

(base-schemas)
source

childrenclj/s

(children ?schema)
(children ?schema options)

Returns the Schema children with all Child Schemas resolved. For MapEntry Schemas, returns a always tuple3 of key ?properties child

Returns the Schema children with all Child Schemas resolved. For
`MapEntry` Schemas, returns a always tuple3 of `key ?properties child`
sourceraw docstring

class-schemasclj/s

(class-schemas)
source

comparator-schemasclj/s

(comparator-schemas)
source

decodeclj/s

(decode ?schema value t)
(decode ?schema value options t)

Transforms a value with a given decoding transformer against a schema.

Transforms a value with a given decoding transformer against a schema.
sourceraw docstring

decoderclj/s

(decoder ?schema t)
(decoder ?schema options t)

Creates a value decoding function given a transformer and a schema.

Creates a value decoding function given a transformer and a schema.
sourceraw docstring

default-registryclj/s

source

default-schemasclj/s

(default-schemas)
source

derefclj/s

(deref ?schema)
(deref ?schema options)

Derefs top-level RefSchemas or returns original Schema.

Derefs top-level `RefSchema`s or returns original Schema.
sourceraw docstring

deref-allclj/s

(deref-all ?schema)
(deref-all ?schema options)

Derefs top-level RefSchemas recursively or returns original Schema.

Derefs top-level `RefSchema`s recursively or returns original Schema.
sourceraw docstring

encodeclj/s

(encode ?schema value t)
(encode ?schema value options t)

Transforms a value with a given encoding transformer against a schema.

Transforms a value with a given encoding transformer against a schema.
sourceraw docstring

encoderclj/s

(encoder ?schema t)
(encoder ?schema options t)

Creates a value encoding transformer given a transformer and a schema.

Creates a value encoding transformer given a transformer and a schema.
sourceraw docstring

entriesclj/s

(entries ?schema)
(entries ?schema options)

Returns MapSchema children as a sequence of clojure.lang/MapEntrys where the values child schemas wrapped in :malli.core/val Schemas, with the entry properties as properties.

Using entries enable usage of entry properties in walking and value transformation.

(def schema [:map [:x int?] [:y {:optional true} int?]])

(m/children schema) ; [[:x nil int?] ; [:y {:optional true} int?]]

(m/entries schema) ; [[:x [:malli.core/val int?]] ; [:y [:malli.core/val {:optional true} int?]]]

(map key (m/entries schema)) ; (:x :y)

Returns `MapSchema` children as a sequence of `clojure.lang/MapEntry`s
where the values child schemas wrapped in `:malli.core/val` Schemas,
with the entry properties as properties.

Using `entries` enable usage of entry properties in walking and value
transformation.

   (def schema
     [:map
      [:x int?]
      [:y {:optional true} int?]])

   (m/children schema)
   ; [[:x nil int?]
   ;  [:y {:optional true} int?]]

   (m/entries schema)
   ; [[:x [:malli.core/val int?]]
   ;  [:y [:malli.core/val {:optional true} int?]]]

   (map key (m/entries schema))
   ; (:x :y)
sourceraw docstring

evalclj/s

(eval ?code)
(eval ?code options)
source

explainclj/s

(explain ?schema value)
(explain ?schema value options)

Explains a value against a given schema. Creates the explainer for every call. When performance matters, (re-)use explainer instead.

Explains a value against a given schema. Creates the `explainer` for every call.
When performance matters, (re-)use `explainer` instead.
sourceraw docstring

explainerclj/s

(explainer ?schema)
(explainer ?schema options)

Returns an pure explainer function of type x -> explanation for a given Schema

Returns an pure explainer function of type `x -> explanation` for a given Schema
sourceraw docstring

formclj/s

(form ?schema)
(form ?schema options)

Returns the Schema form

Returns the Schema form
sourceraw docstring

FunctionSchemaclj/sprotocol

-arityclj/s

(-arity this)

-input-schemaclj/s

(-input-schema this)

-output-schemaclj/s

(-output-schema this)
source

into-schemaclj/s

(into-schema type properties children)
(into-schema type properties children options)

Creates a Schema instance out of type, optional properties map and children

Creates a Schema instance out of type, optional properties map and children
sourceraw docstring

into-schema?clj/s

(into-schema? x)

Checks if x is a IntoSchema instance

Checks if x is a IntoSchema instance
sourceraw docstring

IntoSchemaclj/sprotocol

-into-schemaclj/s

(-into-schema this properties children options)

creates a new schema instance

creates a new schema instance
source

LensSchemaclj/sprotocol

-getclj/s

(-get this key default)

returns schema at key

returns schema at key

-keepclj/s

(-keep this)

returns truthy if schema contributes to value path

returns truthy if schema contributes to value path

-setclj/s

(-set this key value)

returns a copy with key having new value

returns a copy with key having new value
source

MapSchemaclj/sprotocol

-entriesclj/s

(-entries this)

returns sequence of key -val-schema MapEntries

returns sequence of `key -val-schema` MapEntries
source

optionsclj/s

(options ?schema)
(options ?schema options)

Returns options used in creating the Schema

Returns options used in creating the Schema
sourceraw docstring

parseclj/s

(parse ?schema value)
(parse ?schema value options)

parses a value against a given schema. Creates the parser for every call. When performance matters, (re-)use parser instead.

parses a value against a given schema. Creates the `parser` for every call.
When performance matters, (re-)use `parser` instead.
sourceraw docstring

parserclj/s

(parser ?schema)
(parser ?schema options)

Returns an pure parser function of type x -> either parsed-x ::invalid for a given Schema

Returns an pure parser function of type `x -> either parsed-x ::invalid` for a given Schema
sourceraw docstring

predicate-schemasclj/s

(predicate-schemas)
source

propertiesclj/s

(properties ?schema)
(properties ?schema options)

Returns the Schema properties

Returns the Schema properties
sourceraw docstring

RefSchemaclj/sprotocol

-derefclj/s

(-deref this)

returns the referenced schema

returns the referenced schema

-refclj/s

(-ref this)

returns the reference name

returns the reference name
source

RegexSchemaclj/sprotocol

-regex-explainerclj/s

(-regex-explainer this path)

returns the raw internal regex explainer implementation

returns the raw internal regex explainer implementation

-regex-op?clj/s

(-regex-op? this)

is this a regex operator (e.g. :cat, :*...)

is this a regex operator (e.g. :cat, :*...)

-regex-parserclj/s

(-regex-parser this)

returns the raw internal regex parser implementation

returns the raw internal regex parser implementation

-regex-transformerclj/s

(-regex-transformer this transformer method options)

returns the raw internal regex transformer implementation

returns the raw internal regex transformer implementation

-regex-validatorclj/s

(-regex-validator this)

returns the raw internal regex validator implementation

returns the raw internal regex validator implementation
source

Schemaclj/sprotocol

-validatorclj/s

(-validator this)

returns a predicate function that checks if the schema is valid

returns a predicate function that checks if the schema is valid

-optionsclj/s

(-options this)

returns original options

returns original options

-transformerclj/s

(-transformer this transformer method options)

returns a function to transform the value for the given schema and method. Can also return nil instead of identity so that more no-op transforms can be elided.

returns a function to transform the value for the given schema and method.
Can also return nil instead of `identity` so that more no-op transforms can be elided.

-walkclj/s

(-walk this walker path options)

walks the schema and it's children, ::m/walk-entry-vals, ::m/walk-refs, ::m/walk-schema-refs options effect how walking is done.

walks the schema and it's children, ::m/walk-entry-vals, ::m/walk-refs, ::m/walk-schema-refs options effect how walking is done.

-parserclj/s

(-parser this)

return a function of x -> parsed-x | ::m/invalid to explain how schema is valid.

return a function of `x -> parsed-x | ::m/invalid` to explain how schema is valid.

-propertiesclj/s

(-properties this)

returns original schema properties

returns original schema properties

-typeclj/s

(-type this)

returns type of the schema

returns type of the schema

-childrenclj/s

(-children this)

returns schema children

returns schema children

-formclj/s

(-form this)

returns original form of the schema

returns original form of the schema

-explainerclj/s

(-explainer this path)

returns a function of x in acc -> maybe errors to explain the errors for invalid values

returns a function of `x in acc -> maybe errors` to explain the errors for invalid values

-type-propertiesclj/s

(-type-properties this)

returns schema type properties

returns schema type properties

-parentclj/s

(-parent this)

returns the IntoSchema instance

returns the IntoSchema instance
source

schemaclj/s

(schema ?schema)
(schema ?schema options)

Creates a Schema object from any of the following:

  • Schema instance (just returns it)
  • IntoSchema instance
  • Schema vector syntax, e.g. [:string {:min 1}]
  • Qualified Keyword or String, using a registry lookup
Creates a Schema object from any of the following:

- Schema instance (just returns it)
- IntoSchema instance
- Schema vector syntax, e.g. [:string {:min 1}]
- Qualified Keyword or String, using a registry lookup
sourceraw docstring

schema-walkerclj/s

(schema-walker f)
source

schema?clj/s

(schema? x)

Checks if x is a Schema instance

Checks if x is a Schema instance
sourceraw docstring

Schemasclj/sprotocol

-into-schema?clj/s

(-into-schema? this)

-schema?clj/s

(-schema? this)
source

sequence-schemasclj/s

(sequence-schemas)
source

Transformerclj/sprotocol

-transformer-chainclj/s

(-transformer-chain this)

returns transformer chain as a vector of maps with :name, :encoders, :decoders and :options

returns transformer chain as a vector of maps with :name, :encoders, :decoders and :options

-value-transformerclj/s

(-value-transformer this schema method options)

returns an value transforming interceptor for the given schema and method

returns an value transforming interceptor for the given schema and method
source

typeclj/s

(type ?schema)
(type ?schema options)

Returns the Schema type.

Returns the Schema type.
sourceraw docstring

type-propertiesclj/s

(type-properties ?schema)
(type-properties ?schema options)

Returns the Schema type properties

Returns the Schema type properties
sourceraw docstring

type-schemasclj/s

(type-schemas)
source

validateclj/s

(validate ?schema value)
(validate ?schema value options)

Validates a value againsta a given schema. Creates the validator for every call. When performance matters, (re-)use validator instead.

Validates a value againsta a given schema. Creates the `validator` for every call.
When performance matters, (re-)use `validator` instead.
sourceraw docstring

validatorclj/s

(validator ?schema)
(validator ?schema options)

Returns an pure validation function of type x -> boolean for a given Schema

Returns an pure validation function of type `x -> boolean` for a given Schema
sourceraw docstring

walkclj/s

(walk ?schema f)
(walk ?schema f options)

Postwalks recursively over the Schema and it's children. The walker callback is a arity4 function with the following arguments: schema, path, (walked) children and options.

Postwalks recursively over the Schema and it's children.
The walker callback is a arity4 function with the following
arguments: schema, path, (walked) children and options.
sourceraw docstring

Walkerclj/sprotocol

-acceptclj/s

(-accept this schema path options)

-innerclj/s

(-inner this schema path options)

-outerclj/s

(-outer this schema path children options)
source

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

× close