Liking cljdoc? Tell your friends :D

commando.impl.finding-commands


command-valid?clj/s

(command-valid? {:keys [validate-params-fn] :as _command-spec} value)
source

command?clj/s

(command? {:keys [recognize-fn] :as command-spec} value)
source

find-commandsclj/s

(find-commands instruction command-registry)
(find-commands instruction
               {:keys [registry-runtime] :as _command-registry}
               _opts)

Traverses the instruction tree (BFS) and collects all commands defined by the registry. Returns {:commands #{...} :trie {...}} — the command set and path-trie built in the same pass.

Options: Optimizations:

  • Index-based transient queue: O(N) instead of O(N²) from subvec+into copying
  • Transient found-commands set: O(N) set allocations saved
  • Direct enqueue: no intermediate mapv vectors for child-path generation
  • Transient trie root: N root-level HAMT copies avoided during bulk construction
Traverses the instruction tree (BFS) and collects all commands defined by the registry.
Returns {:commands #{...} :trie {...}} — the command set and path-trie built in the same pass.

Options:
Optimizations:
- Index-based transient queue: O(N) instead of O(N²) from subvec+into copying
- Transient found-commands set: O(N) set allocations saved
- Direct enqueue: no intermediate mapv vectors for child-path generation
- Transient trie root: N root-level HAMT copies avoided during bulk construction
sourceraw 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