Improve color asignation to profile and sessions.

This commit is contained in:
Andrey Antukh 2020-04-27 13:58:56 +02:00 committed by Alonso Torres
parent f2e4417d87
commit 0ee25b6f42
7 changed files with 97 additions and 67 deletions

View file

@ -34,14 +34,13 @@
(rest keys)
(unchecked-get res key))))))
(defn assign!
(defn merge!
([a b]
(js/Object.assign a b))
([a b & more]
(reduce assign! (assign! a b) more)))
(reduce merge! (merge! a b) more)))
(defn assoc!
[obj attr value]
(when (object? obj)
(unchecked-set obj attr value)
obj))
(defn set!
[obj key value]
(unchecked-set obj key value)
obj)