Some misc. utility functions. These are primarily meant for internal use, and are subject to relocation in the future.
Some misc. utility functions. These are primarily meant for internal use, and are subject to relocation in the future.
(destructured-keys m)
Calculates the keys that are being extracted in a legal map destructuring expression.
m
: A map containing legal CLJ destructurings, like {:keys [a] x :x ::keys [y]}
Returns a set of all keywords that are destructured in the map.
Example:
(destructured-keys {:a/keys [v] sym :other-key}) => #{:a/v :other-key}
Calculates the keys that are being extracted in a legal map destructuring expression. - `m`: A map containing legal CLJ destructurings, like `{:keys [a] x :x ::keys [y]}` Returns a set of all keywords that are destructured in the map. Example: ``` (destructured-keys {:a/keys [v] sym :other-key}) => #{:a/v :other-key} ```
(elide-ast-nodes {:keys [key union-key children] :as ast} elision-predicate)
Remove items from a query (AST) that have a key that returns true for the elision-predicate
Remove items from a query (AST) that have a key that returns true for the elision-predicate
(elide-query-nodes query node-predicate)
Remove items from a query when the query element where the (node-predicate key) returns true. Commonly used with a set as a predicate to elide specific well-known UI-only paths.
Remove items from a query when the query element where the (node-predicate key) returns true. Commonly used with a set as a predicate to elide specific well-known UI-only paths.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close