Liking cljdoc? Tell your friends :D

jj.bettong.impl.edn-text

Editing EDN through a syntax tree that keeps everything a reader throws away.

clojure.edn/read-string gives you data, and data has no comments, no key order and no indentation - so no writer can put them back. The tree here keeps whitespace, comments and #_ discards as nodes of their own, which makes rendering it the exact original text and an edit a change to one node.

Nodes are plain maps:

{:type :whitespace :text " \n\n"} {:type :comment :text ";; why this is 3000"} {:type :token :text "8080"} {:type :map :open "{" :close "}" :children [...]} {:type :wrapper :text "#inst" :children [...]} ; #_ ^meta 'quote #tag

parse and render are inverses: (= s (render (parse s))) for any EDN.

Editing EDN through a syntax tree that keeps everything a reader throws away.

`clojure.edn/read-string` gives you data, and data has no comments, no key
order and no indentation - so no writer can put them back. The tree here
keeps whitespace, comments and `#_` discards as nodes of their own, which
makes rendering it the exact original text and an edit a change to one node.

Nodes are plain maps:

  {:type :whitespace :text " \n\n"}
  {:type :comment    :text ";; why this is 3000"}
  {:type :token      :text "8080"}
  {:type :map        :open "{" :close "}" :children [...]}
  {:type :wrapper    :text "#inst" :children [...]}   ; #_ ^meta 'quote #tag

`parse` and `render` are inverses: (= s (render (parse s))) for any EDN.
raw docstring

jj.bettong.impl.files

Path resolution and the file operations behind the filesystem capability. Every path goes through resolve-path, which is where confinement to a root and the refusal to touch credential files live.

Path resolution and the file operations behind the filesystem capability.
Every path goes through `resolve-path`, which is where confinement to a root
and the refusal to touch credential files live.
raw docstring

jj.bettong.impl.json

The one place JSON lives, so the parser behind it is a single-file change.

clojure.data.json is chosen for its dependency profile rather than its speed: it is pure Clojure and pulls nothing else in, which matters more in a library other applications embed than raw throughput does on payloads this size. The JDK's own JSON API (JEP 540) lands in jdk.incubator.json in JDK 28 and would slot in here.

The one place JSON lives, so the parser behind it is a single-file change.

`clojure.data.json` is chosen for its dependency profile rather than its
speed: it is pure Clojure and pulls nothing else in, which matters more in a
library other applications embed than raw throughput does on payloads this
size. The JDK's own JSON API (JEP 540) lands in jdk.incubator.json in JDK 28
and would slot in here.
raw docstring

jj.bettong.impl.options

Option checks shared by the capabilities.

Option checks shared by the capabilities.
raw docstring

jj.bettong.impl.shell

Running commands behind the shell capability: the command policy, the process itself, and the truncation that keeps its output from swallowing the transcript.

Running commands behind the shell capability: the command policy, the
process itself, and the truncation that keeps its output from swallowing
the transcript.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close