diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-10-09 22:05:47 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-10-09 22:05:47 +0300 |
| commit | d654135ffebe935317a1f946c123bd25e4fb6aa3 (patch) | |
| tree | 4568d42e8732c0f80b55afee1e5efa302b8007c9 /src/dompa/nodes.cljs | |
| parent | 06085b955bb2959a88844dae9f77a0f35ee6a8c5 (diff) | |
Do away with the $ macro for runtime-agnostic purposes
Diffstat (limited to 'src/dompa/nodes.cljs')
| -rw-r--r-- | src/dompa/nodes.cljs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/dompa/nodes.cljs b/src/dompa/nodes.cljs deleted file mode 100644 index 8e19e2f..0000000 --- a/src/dompa/nodes.cljs +++ /dev/null @@ -1,24 +0,0 @@ -(ns dompa.nodes) - -(defn $ - "Creates a new node - - Usage: - - ```clojure - ($ :div - ($ \"hello world\" )) - ```" - [name & opts] - (if (string? name) - {:node/name :dompa/text - :node/value (apply str name opts)} - (let [first-opt (first opts) - attrs? (and (map? first-opt) - (not (contains? first-opt :node/name))) - attrs (if attrs? first-opt {}) - children (if attrs? (rest opts) opts)] - (cond-> {:node/name name} - attrs? (assoc :node/attrs attrs) - (seq children) (assoc :node/children children))))) - |
