Liking cljdoc? Tell your friends :D

spec-coerce.core


*inst-formats*clj

source

*overrides*clj/s

Allows overriding of specs in the registry within a local binding context.

(binding [sc/overrides {::my-key my-coerce-fn}] (sc/coerce ::my/spec data))

Allows overriding of specs in the registry within a local binding
context.

(binding [sc/*overrides* {::my-key my-coerce-fn}]
  (sc/coerce ::my/spec data))
sourceraw docstring

coerceclj/s

(coerce k x)
source

coerce!clj/s

(coerce! k x)

Like coerce, but will call s/assert on the result, making it throw an error if value doesn't comply after coercion.

Like coerce, but will call s/assert on the result, making it throw an error if value
doesn't comply after coercion.
sourceraw docstring

coerce-fnclj/s

(coerce-fn k)
source

coerce-structureclj/s

(coerce-structure x)
(coerce-structure x {:spec-coerce.core/keys [overrides op] :or {op coerce}})

Recursively coerce map values on a structure.

Recursively coerce map values on a structure.
sourceraw docstring

conformclj/s

(conform k x)

Like coerce, and will call s/conform on the result.

Like coerce, and will call s/conform on the result.
sourceraw docstring

defclj/smacro

(def k coercion)

Given a namespace-qualified keyword, and a coerce function, makes an entry in the registry mapping k to the coerce function.

Given a namespace-qualified keyword, and a coerce function, makes an entry in the
registry mapping k to the coerce function.
source (clj)source (cljs)raw docstring

infer-coercionclj/s

(infer-coercion k)
source

nilable-spec?clj/s

(nilable-spec? spec)
source

parse-booleanclj/s

(parse-boolean x)
source

parse-coll-ofclj/s

(parse-coll-of [_ pred & _])
source

parse-decimalclj

(parse-decimal x)
source

parse-doubleclj/s

(parse-double x)
source

parse-identclj/s

(parse-ident x)
source

parse-instclj/s

(parse-inst x)
source

parse-keywordclj/s

(parse-keyword x)
source

parse-longclj/s

(parse-long x)
source

parse-map-ofclj/s

(parse-map-of [_ kpred vpred & _])
source

parse-nilclj/s

(parse-nil x)
source

parse-orclj/s

(parse-or [_ & pairs])
source

parse-symbolclj/s

(parse-symbol x)
source

parse-uriclj

(parse-uri x)
source

parse-uuidclj/s

(parse-uuid x)
source

pull-nilableclj/s

(pull-nilable spec)
source

sym->coercerclj/smultimethod

source

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

× close