Liking cljdoc? Tell your friends :D

spec-tools.data-spec

Data Specs

Data Specs
raw docstring

maybeclj/s

(maybe v)
source

Maybeclj/s

source

maybe?clj/s

(maybe? x)
source

nested-keyclj/s

(nested-key n k)
source

optclj/s

(opt k)
source

opt?clj/s

(opt? x)
source

OptionalKeyclj/s

source

orclj/s

(or v)
source

Orclj/s

source

or?clj/s

(or? x)
source

reqclj/s

(req k)
source

req?clj/s

(req? x)
source

RequiredKeyclj/s

source

specclj/s

(spec {data :spec name :name nested? :spec-tools.data-spec/nested? :as opts})
(spec name data)

Creates a clojure.spec.alpha/Spec out of a data-spec. Supports 2 arities:

;; arity1 (ds/spec {:spec {:i int?} :name ::map})

;; arity2 (legacy) (ds/spec ::map {:i int?})

The following options are valid for the 1 arity case:

         :spec the data-spec form (required)
         :name fully qualified keyword name for the spec, used in keys-spec
               key spec registration, required if there are non-qualified
               keyword keys in maps.
    :keys-spec function to generate keys-spec (default: [[keys-spec]])
 :keys-default optional function to wrap the plain keyword keys, e.g. setting
               the value to [[opt]] maes all plain keyword keys optional.
Creates a clojure.spec.alpha/Spec out of a data-spec. Supports 2 arities:

   ;; arity1
   (ds/spec
     {:spec {:i int?}
      :name ::map})

   ;; arity2 (legacy)
   (ds/spec ::map {:i int?})

The following options are valid for the 1 arity case:

             :spec the data-spec form (required)
             :name fully qualified keyword name for the spec, used in keys-spec
                   key spec registration, required if there are non-qualified
                   keyword keys in maps.
        :keys-spec function to generate keys-spec (default: [[keys-spec]])
     :keys-default optional function to wrap the plain keyword keys, e.g. setting
                   the value to [[opt]] maes all plain keyword keys optional.
sourceraw docstring

unwrap-keyclj/s

(unwrap-key x)
source

wrapped-key?clj/s

(wrapped-key? x)
source

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

× close