Liking cljdoc? Tell your friends :D

expound.alpha

Functions to print human-readable errors for clojure.spec

Functions to print human-readable errors for clojure.spec
raw docstring

custom-printerclj/s

(custom-printer opts)

Returns a printer.

Options: :show-valid-values? - if false, replaces valid values with "..." :value-str-fn - function to print bad values :print-specs? - if true, display "Relevant specs" section. Otherwise, omit that section. :theme - enables color theme. Possible values: :figwheel-theme, :none

Returns a printer.

Options:
 :show-valid-values? - if false, replaces valid values with "..."
 :value-str-fn       - function to print bad values
 :print-specs?       - if true, display "Relevant specs" section. Otherwise, omit that section.
 :theme               - enables color theme. Possible values: :figwheel-theme, :none
sourceraw docstring

defclj/smacro

(def k spec-form)
(def k spec-form error-message)

Define a spec with an optional error-message.

Replaces clojure.spec.alpha/def but optionally takes a human-readable error-message (will only be used for predicates) e.g. 'should be a string'.

Define a spec with an optional `error-message`.

Replaces `clojure.spec.alpha/def` but optionally takes a human-readable `error-message` (will only be used for predicates) e.g. 'should be a string'.
sourceraw docstring

defmsgclj/s

(defmsg k error-message)

Associates the spec named k with error-message.

Associates the spec named `k` with `error-message`.
sourceraw docstring

error-messageclj/s

(error-message k)

Given a spec named k, return its human-readable error message.

Given a spec named `k`, return its human-readable error message.
sourceraw docstring

explain-resultclj/s

(explain-result check-result)

Given a result from clojure.spec.test.alpha/check, prints a summary of the result.

Given a result from `clojure.spec.test.alpha/check`, prints a summary of the result.
sourceraw docstring

explain-result-strclj/s

(explain-result-str check-result)

Given a result from clojure.spec.test.alpha/check, returns a string summarizing the result.

Given a result from `clojure.spec.test.alpha/check`, returns a string summarizing the result.
sourceraw docstring

explain-resultsclj/s

(explain-results check-results)

Given a sequence of results from clojure.spec.test.alpha/check, prints a summary of the results.

Given a sequence of results from `clojure.spec.test.alpha/check`, prints a summary of the results.
sourceraw docstring

explain-results-strclj/s

(explain-results-str check-results)

Given a sequence of results from clojure.spec.test.alpha/check, returns a string summarizing the results.

Given a sequence of results from `clojure.spec.test.alpha/check`, returns a string summarizing the results.
sourceraw docstring

expoundclj/s

(expound spec form)

Given a spec and a form, either prints a success message or a human-readable error message.

Given a `spec` and a `form`, either prints a success message or a human-readable error message.
sourceraw docstring

expound-strclj/s

(expound-str spec form)

Given a spec and a form, either returns success message or a human-readable error message.

Given a `spec` and a `form`, either returns success message or a human-readable error message.
sourceraw docstring

printerclj/s

(printer explain-data)

Prints explain-data in a human-readable format.

Prints `explain-data` in a human-readable format.
sourceraw docstring

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

× close