Liking cljdoc? Tell your friends :D

sweet-tooth.describe


add-descriptionclj/s

(add-description descriptions rule result)

If dscr is a function apply it to result of pred function Otherwise return dscr

If dscr is a function apply it to result of pred function
Otherwise return dscr
sourceraw docstring

base-arityclj/s

(base-arity name args rule)
source

blankclj

(blank arg)
(blank arg dscr)
source

contextclj/s

(context cfn)

Used in rules to access the context passed in to describe.

Used in rules to access the context passed in to describe.
sourceraw docstring

count-not-in-rangeclj

(count-not-in-range arg)
(count-not-in-range arg m n)
(count-not-in-range arg m n dscr)
source

default-translationsclj/s

source

defruleclj/smacro

(defrule name args rule)
source (clj)source (cljs)

describeclj/s

(describe x rules & [additional-ctx])
source

does-not-matchclj

(does-not-match arg)
(does-not-match arg regex)
(does-not-match arg regex dscr)
source

emptyclj

(empty arg)
(empty arg dscr)
source

graphclj/s

(graph node-defs)

Allows slightly more compact syntax for defining graphs by treating a vector of [:a :b :c] as pairs [:a :b] [:b :c] and by treating rule maps as nodes instead of attempting to treat them as maps describing nodes and edges

Allows slightly more compact syntax for defining graphs by treating a
vector of [:a :b :c] as pairs [:a :b] [:b :c] and by treating
rule maps as nodes instead of attempting to treat them as maps
describing nodes and edges
sourceraw docstring

key-ruleclj/s

(key-rule key-fn rules)

Treats value returned by key-fn as new context that you're applying rules to

Treats value returned by key-fn as new context that you're applying rules to
sourceraw docstring

map-describeclj/s

(map-describe rules xs)
(map-describe rules additional-ctx xs)

Apply rules to xs; return nil if all descriptions nil

Apply rules to xs; return nil if all descriptions nil
sourceraw docstring

map-rollup-descriptionsclj/s

(map-rollup-descriptions descriptions)

Converts set of descriptions to a map roughly reflecting the original map described. Descriptions take the form of:

#{[:a [::y]] [:a [::z]] [:b [::x]]}

This returns a map of the form:

{:a #{::y ::z} :b #{::x}}

A concession to people who insist that this is about validation and not describing.

Converts set of descriptions to a map roughly reflecting the original
map described. Descriptions take the form of:

#{[:a [::y]]
  [:a [::z]]
  [:b [::x]]}

This returns a map of the form:

{:a #{::y ::z}
 :b #{::x}}

A concession to people who insist that this is about validation and
not describing.
sourceraw docstring

matchesclj

(matches arg)
(matches arg regex)
(matches arg regex dscr)
source

not-alnumclj/s

(not-alnum arg)
source

not-in-rangeclj

(not-in-range arg)
(not-in-range arg m n)
(not-in-range arg m n dscr)
source

not=clj

(not= arg)
(not= arg compare-to)
(not= arg compare-to dscr)
source

path-ruleclj/s

(path-rule key-fns rules)

Nested key rules

Nested key rules
sourceraw docstring

remove-rule-subgraphclj/s

(remove-rule-subgraph rule-graph rule)

Remove all downstream rules so that we don't attempt to apply them

Remove all downstream rules so that we don't attempt to apply them
sourceraw docstring

resolve-argsclj/s

(resolve-args ctx args)

Rule args come in four flavors:

  • A function wrapped with context. This resolves by applying the fn to the context.
  • A fn with the :const keyword in metadata. This resolves to itself.
  • A keyword or fn. This resolves by being applied to the subject (the thing being described).
  • Something else. This resolves to itself.
Rule args come in four flavors:
* A function wrapped with `context`. This resolves by applying
  the fn to the context.
* A fn with the `:const` keyword in metadata. This resolves to itself.
* A keyword or fn. This resolves by being applied to the subject (the thing being described).
* Something else. This resolves to itself.
sourceraw docstring

rule-applies?clj/s

(rule-applies? ctx rule-graph rule)

Apply the predicate function to args.

Apply the predicate function to args.
sourceraw docstring

rules->graphclj/s

(rules->graph rules)

Convert data structure describing graph to an actual graph.

Convert data structure describing graph to an actual graph.
sourceraw docstring

spec-explain-dataclj

(spec-explain-data arg)
(spec-explain-data arg spec)
(spec-explain-data arg spec dscr)
source

spec-not-validclj

(spec-not-valid arg)
(spec-not-valid arg spec)
(spec-not-valid arg spec dscr)
source

translateclj/s

(translate descriptions)
(translate translations descriptions)
source

translate-descriptionclj/s

(translate-description [arg dscr] translations)
source

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

× close