(clj->json x)
Converts a Clojure data structure to JSON.
Converts a Clojure data structure to JSON.
(constraints->logic constraints)
Generates the default 'A and B and ...' constraint logic string from a
sequence of constraints. Note that :code
needs to be present on all
constraint maps.
Generates the default 'A and B and ...' constraint logic string from a sequence of constraints. Note that `:code` needs to be present on all constraint maps.
(display-name model view)
Takes a view path and returns a human-readable name string.
Takes a view path and returns a human-readable name string.
(on-event trigger callback)
For use with :ref
attribute on elements to easily define jquery listeners.
Uses some->
as the event isn't guaranteed to hold a value. Returns the event
so you can chain multiple on
calls by wrapping them in comp
. Example:
[:span.dropdown
{:ref (comp
(on "hide.bs.dropdown"
#(js/alert "I'm closing!"))
(on "show.bs.dropdown"
#(js/alert "I'm opening!")))}]
For use with `:ref` attribute on elements to easily define jquery listeners. Uses `some->` as the event isn't guaranteed to hold a value. Returns the event so you can chain multiple `on` calls by wrapping them in `comp`. Example: [:span.dropdown {:ref (comp (on "hide.bs.dropdown" #(js/alert "I'm closing!")) (on "show.bs.dropdown" #(js/alert "I'm opening!")))}]
(path->displaynames model view)
Takes a path as the view
argument and returns the corresponding vector of
display names. Will prioritise the displayName of the referencedType class
(instead of the displayName in the references/collections/attributes map).
This makes a difference with eg. Gene.dataSets.name
, where
classes.Gene.collections.dataSets.displayName
is Data Sets
while
classes.DataSet.displayName
is Data Set
.
Takes a path as the `view` argument and returns the corresponding vector of display names. Will prioritise the displayName of the referencedType class (instead of the displayName in the references/collections/attributes map). This makes a difference with eg. `Gene.dataSets.name`, where `classes.Gene.collections.dataSets.displayName` is `Data Sets` while `classes.DataSet.displayName` is `Data Set`.
(pretty-number n)
Returns a human-readable (comma thousand-separators) number using the Google Closure formatter.
Returns a human-readable (comma thousand-separators) number using the Google Closure formatter.
(response->error response)
Convert an HTTP response to an error map.
Convert an HTTP response to an error map.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close