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.
(refresh inspector config-override)
Update inspector configuration with values in config-override
and re-render.
Unspecified config values remain the same. Supported config keys:
:page-size
- page size in pagination mode
:max-atom-length
- maximum length of atomic value before truncating
:max-value-length
- maximum length of a whole printed value before truncating
:max-coll-size
- maximum number of collection items to print before truncating
:max-nested-depth
- maximum nesting level to print before truncating
Update inspector configuration with values in `config-override` and re-render. Unspecified config values remain the same. Supported config keys: `:page-size` - page size in pagination mode `:max-atom-length` - maximum length of atomic value before truncating `:max-value-length` - maximum length of a whole printed value before truncating `:max-coll-size` - maximum number of collection items to print before truncating `:max-nested-depth` - maximum nesting level to print before truncating
(render-value inspector 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)
Use refresh
instead.
Use `refresh` instead.
(set-max-coll-size inspector max-coll-size)
Use refresh
instead.
Use `refresh` instead.
(set-max-nested-depth inspector max-nested-depth)
Use refresh
instead.
Use `refresh` instead.
(set-max-value-length inspector max-value-length)
Use refresh
instead.
Use `refresh` instead.
(set-page-size inspector new-page-size)
Use refresh
instead.
Use `refresh` instead.
(set-view-mode inspector mode)
Set the view mode for the current value to mode
. See allowed values in
supported-view-modes
.
Set the view mode for the current value to `mode`. See allowed values in `supported-view-modes`.
(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). See refresh
for the list
of supported keys.
Create a new inspector for the `value`. Optinally accepts a `config` map (which can be an existing inspector with changed config). See `refresh` for the list of supported keys.
(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