General purpose plugin utilities
General purpose plugin utilities
(attractively-stringified-value v)
Does some standard prettification of forms:
: a function named foo
: a nicely printed stack trace
: maps and sets sorted by key.
Does some standard prettification of forms: : a function named `foo` : a nicely printed stack trace : maps and sets sorted by key.
(failure-notice m)
The reader's eye is guided by a bright red FAIL, the filename and line-number, and perhaps this other information:
The reader's eye is guided by a bright red FAIL, the filename and line-number, and perhaps this other information: - the descriptions of all enclosing facts, if any - notes on which bindings were supplied to a tabular fact
(filename-lineno [filename line-num])
The ordinary way to describe the location of a failure.
The ordinary way to describe the location of a failure.
(format-nested-descriptions nested-description-vector)
Takes vector like ["about cars" nil "sports cars are fast"] and returns non-nils joined with -'s => "about cars - sports cars are fast"
Takes vector like ["about cars" nil "sports cars are fast"] and returns non-nils joined with -'s => "about cars - sports cars are fast"
(function-name function)
Convert a function into a readable name, if possible.
Convert a function into a readable name, if possible.
(linearize-lines messy-lines)
Takes a nested structure that contains nils and strings. Converts it into a simple sequence of strings.
Takes a nested structure that contains nils and strings. Converts it into a simple sequence of strings.
(nested-sort x)
Sorts two nested collections for easy visual comparison. Sets and maps are converted to order-sets and ordered-maps.
Sorts two nested collections for easy visual comparison. Sets and maps are converted to order-sets and ordered-maps.
(position-str [filename line-num] namespace)
Describe a failure with optional namespace
Describe a failure with optional namespace
(prerequisite-var-description prerequisite-var)
Takes a var naming a prerequisite and returns a string useful for printing
Takes a var naming a prerequisite and returns a string useful for printing
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close