Liking cljdoc? Tell your friends :D

schema.utils

Private utilities used in schema implementation.

Private utilities used in schema implementation.
raw docstring

assoc-whenclj/s

(assoc-when m & kvs)

Like assoc but only assocs when value is truthy. Copied from plumbing.core so that schema need not depend on plumbing.

Like assoc but only assocs when value is truthy.  Copied from plumbing.core so that
schema need not depend on plumbing.
sourceraw docstring

class-schemaclj/s

(class-schema klass)
source (clj)source (cljs)

declare-class-schema!clj/s

(declare-class-schema! klass schema)
source (clj)source (cljs)

errorclj/s

(error x)

Distinguish a value (must be non-nil) as an error.

Distinguish a value (must be non-nil) as an error.
sourceraw docstring

error-valclj/s

(error-val x)
source

error?clj/s

(error? x)
source

ErrorContainerclj/s

source

fn-schema-bearerclj/s

(fn-schema-bearer f)

What class can we associate the fn schema with? In Clojure use the class of the fn; in cljs just use the fn itself.

What class can we associate the fn schema with? In Clojure use the class of the fn; in
cljs just use the fn itself.
sourceraw docstring

format*clj/s

(format* fmt & args)
source

make-ValidationErrorclj/s

(make-ValidationError schema value expectation-delay fail-explanation)

for cljs sake (easier than normalizing imports in macros.clj)

for cljs sake (easier than normalizing imports in macros.clj)
sourceraw docstring

max-value-lengthclj/s

source

memoize-idclj/s

(memoize-id f)

Identity version of memoize, because many schemas are records, and records don't cache their hash codes (at least in Clojure 1.5.1). Not thread safe, and doesn't cache falsey values.

Identity version of memoize, because many schemas are records, and records
don't cache their hash codes (at least in Clojure 1.5.1).
Not thread safe, and doesn't cache falsey values.
sourceraw docstring

named-error-explainclj/s

(named-error-explain err)
source

NamedErrorcljs

source

PSimpleCellcljsprotocol

get_cellcljs

(get_cell this)

set_cellcljs

(set_cell this x)
source

record?clj/s

(record? x)
source

result-builderclj/s

(result-builder lift-to-error)

Build up a result by conjing values, producing an error if at least one sub-value returns an error.

Build up a result by conjing values, producing an error if at least one
sub-value returns an error.
sourceraw docstring

SimpleVCellcljs

source

type-ofclj/s

(type-of x)
source

use-fn-validationclj/s

Turn on run-time function validation for functions compiled when s/compile-fn-validation was true -- has no effect for functions compiled when it is false.

Turn on run-time function validation for functions compiled when
s/compile-fn-validation was true -- has no effect for functions compiled
when it is false.
sourceraw docstring

validation-error-explainclj/s

(validation-error-explain err)
source

ValidationErrorcljs

source

value-nameclj/s

(value-name value)

Provide a descriptive short name for a value.

Provide a descriptive short name for a value.
sourceraw docstring

wrap-error-nameclj/s

(wrap-error-name name maybe-error)

If maybe-error is an error, wrap the inner value in a NamedError; otherwise, return as-is

If maybe-error is an error, wrap the inner value in a NamedError; otherwise, return as-is
sourceraw docstring

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

× close