Clojure data structure inspection functionality. This code has a long history and at various points of time it lived in different projects. Originally it was part of swank-clojure, afterwards it was moved to javert, then forked to another project from which it was contributed to cider-nrepl. Finally cider-nrepl was split into two libraries and the code ended up here.
Pretty wild, right?
Clojure data structure inspection functionality. This code has a long history and at various points of time it lived in different projects. Originally it was part of swank-clojure, afterwards it was moved to javert, then forked to another project from which it was contributed to cider-nrepl. Finally cider-nrepl was split into two libraries and the code ended up here. Pretty wild, right?
(clear inspector)
If necessary, use (start inspector nil) instead.
If necessary, use `(start inspector nil) instead.`
(def-current-value inspector namespace var-name)
Define the currently inspected value as a var with the given name in the provided namespace.
Define the currently inspected value as a var with the given name in the provided namespace.
(down inspector idx)
Drill down to an indexed object referred to by the previously rendered value.
Drill down to an indexed object referred to by the previously rendered value.
(fresh)
If necessary, use (start nil)
instead.
If necessary, use `(start nil)` instead.
(inspect-print x)
Get a human readable printout of rendered sequence.
Get a human readable printout of rendered sequence.
(inspect-render {:keys [max-atom-length max-value-length max-coll-size
max-nested-depth value]
:as inspector})
(inspect-render inspector value)
(next-page {:keys [current-page last-page] :as inspector})
Jump to the next page when inspecting a paginated sequence/map. Does nothing if already on the last page.
Jump to the next page when inspecting a paginated sequence/map. Does nothing if already on the last page.
(next-sibling inspector)
Attempt to inspect the item next to the currenlty inspected value in the parent sequential collection.
Attempt to inspect the item next to the currenlty inspected value in the parent sequential collection.
(prev-page {:keys [current-page] :as inspector})
Jump to the previous page when inspecting a paginated sequence/map. Does nothing if already on the first page.
Jump to the previous page when inspecting a paginated sequence/map. Does nothing if already on the first page.
(previous-sibling inspector)
Attempt to inspect the item previous to the currenlty inspected value in the parent sequential collection.
Attempt to inspect the item previous to the currenlty inspected value in the parent sequential collection.
(push-item-to-path path role key)
Takes path
and the role and key of the value to be navigated to, and returns
the updated path to the selected value.
Takes `path` and the role and key of the value to be navigated to, and returns the updated path to the selected value.
(render-value inspector value & {:keys [value-role value-key display-value]})
Render the given value
and add it to the index. value-role
can be provided
to mark in the index that the value comes from a collection, and value-key
stands for the key by which value can be retrieved from its collection.
display-value
string can be provided explicitly.
Render the given `value` and add it to the index. `value-role` can be provided to mark in the index that the value comes from a collection, and `value-key` stands for the key by which value can be retrieved from its collection. `display-value` string can be provided explicitly.
(set-max-atom-length inspector max-atom-length)
Set the maximum length of atomic collection members before they're truncated.
Set the maximum length of atomic collection members before they're truncated.
(set-max-coll-size inspector max-coll-size)
Set the maximum number of nested collection members to print before truncating.
Set the maximum number of nested collection members to print before truncating.
(set-max-nested-depth inspector max-nested-depth)
Set the maximum level of nested collections to print before truncating.
Set the maximum level of nested collections to print before truncating.
(set-max-value-length inspector max-value-length)
Set the maximum length of a whole printed value before it is truncated.
Set the maximum length of a whole printed value before it is truncated.
(set-page-size inspector new-page-size)
Set the page size in pagination mode to the specified value. Current page will be reset to zero.
Set the page size in pagination mode to the specified value. Current page will be reset to zero.
(start value)
(start config value)
Create a new inspector for the value
. Optinally accepts a config
map (which
can be an existing inspector with changed config).
Create a new inspector for the `value`. Optinally accepts a `config` map (which can be an existing inspector with changed config).
(tap-current-value inspector)
Tap the currently inspected value.
Tap the currently inspected value.
(tap-indexed {:keys [index] :as inspector} idx)
Tap the value found at idx
, without navigating to it.
Tap the value found at `idx`, without navigating to it.
(up inspector)
Pop the stack and re-render an earlier value.
Pop the stack and re-render an earlier value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close