Liking cljdoc? Tell your friends :D

exoscale.specs

Utilities extending clj.specs with missing bits (some of which will come with alpha2), like metadata, docstring support

Utilities extending clj.specs with missing bits (some of which will
come with alpha2), like metadata, docstring support
raw docstring

defclj/smacro

(def spec-key spec)
(def spec-key doc-string spec)
(def spec-key metadata spec)
(def spec-key metadata doc-string spec)

Same as clojure.spec/def but take an optional docstring, attr-map.

;; just a doctring:

(exoscale.specs/def ::foo "this is a foo" string?)

;; add metadata (exoscale.specs/def ::foo "this is a foo" {:something :interesting} string?)

It's also identical to clojure.spec/def with no options (as convenience): (exoscale.specs/def ::foo string?)

It returns the spec key, just like clojure.spec/def

Same as `clojure.spec/def` but take an optional `docstring`, `attr-map`.

;; just a doctring:

(exoscale.specs/def ::foo
  "this is a foo"
   string?)

;; add metadata
(exoscale.specs/def ::foo
  "this is a foo"
  {:something :interesting}
  string?)

It's also identical to `clojure.spec/def` with no options (as convenience):
(exoscale.specs/def ::foo string?)

It returns the spec key, just like `clojure.spec/def`
raw docstring

docclj/s

(doc k)

Returns doc associated with spec

Returns doc associated with spec
raw docstring

keysclj/smacro

(keys & {:keys [closed?] :as args})

Like clojure.spec.alpha/keys but allow to pass a :closed? parameter to make the spec strict on allowed keys.

Like clojure.spec.alpha/keys but allow to pass a `:closed?` parameter
to make the spec strict on allowed keys.
raw docstring

metaclj/s

(meta k)

Like clojure.core/meta but for registered specs.

Like clojure.core/meta but for registered specs.
raw docstring

metadata-registryclj/s


select-keysclj

(select-keys x spec)

Selects a set of keys from a map from it's spec. Works with s/keys, s/merge, s/multi-spec.

Selects a set of keys from a map from it's spec. Works with s/keys,
s/merge, s/multi-spec.
raw docstring

unregister-meta!clj/s

(unregister-meta! k)

Unregister meta data for a spec

Unregister meta data for a spec
raw docstring

vary-meta!clj/s

(vary-meta! k f & args)

Like clojure.core/vary-meta but for registered specs, mutates the meta in place, return the keyword spec

Like clojure.core/vary-meta but for registered specs, mutates the
meta in place, return the keyword spec
raw docstring

with-docclj/s

(with-doc k doc)

Add doc metadata on a registered spec

Add doc metadata on a registered spec
raw docstring

with-meta!clj/s

(with-meta! k m)

Like clojure.core/with-meta but for registered specs, mutates the meta in place, return the keyword spec

Like clojure.core/with-meta but for registered specs, mutates the
meta in place, return the keyword spec
raw docstring

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

× close