Liking cljdoc? Tell your friends :D

Design

Types

  1. Predicate schemas:

    • Common (Clojure & ClojureScript):

      • :any?

      • :nil?

      • :some?

      • :boolean?

      • :true?

      • :false?

      • :char?

      • :string?

      • :number?

      • :zero?

      • :even?

      • :odd?

      • :int?

      • :pos-int?

      • :neg-int?

      • :nat-int?

      • :float?

      • :double?

      • :integer?

      • :ident?

      • :simple-ident?

      • :qualified-ident?

      • :symbol?

      • :simple-symbol?

      • :qualified-symbol?

      • :keyword?

      • :simple-keyword?

      • :qualified-keyword?

      • :list?

      • :vector?

      • :map?

      • :set?

      • :special-symbol?

      • :var?

      • :tagged-literal?

      • :coll?

      • :empty?

      • :seq?

      • :seqable?

      • :sequential?

      • :associative?

      • :indexed?

      • :sorted?

      • :counted?

      • :reversible?

      • :fn?

      • :ifn?

      • :inst?

      • :uuid?

      • :uri?

    • Clojure:

      • :decimal?

      • :ratio?

      • :rational?

      • :bytes?

      • :class?

      • :reader-conditional?

  2. Logical (composing) schemas:

    • :and

    • :or

    • :not

  3. Comparison schemas:

    • Common:

      • :=

      • :not=

    • Numbers:

      • :num/<

      • :num/⇐

      • :num/>

      • :num/>=

    • Strings:

      • :str/blank?

      • :str/starts-with?

      • :str/ends-with?

      • :str/contains?

    • Collections:

      • :coll/type

      • :coll/min

      • :coll/max

      • :coll/size

      • :coll/distinct?

      • :coll/contains?

  4. Base schemas:

    • Collections:

      • :enum

      • :coll-of

      • :tuple

      • :map-of

    • Sequences:

      • :cat - concatenation of schemas

      • :alt - choice among alternative schemas

      • :* - 0 or more of a schema

      • :+ - 1 or more of a schema

      • :? - 0 or 1 of a schema

    • Entities:

      • :map

    • Multi schema:

      • :multi

    • Regular expressions:

      • :regexp

Syntax

The schema syntax is very simple.

TBD

Can you improve this documentation?Edit on GitHub

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

× close