Liking cljdoc? Tell your friends :D

hara.platform.keystore.base


batch-in-atomclj

(batch-in-atom atom path add-map del-vec)

perform batch add and remove operations (-> (atom {:a {:b 1 :c 2}}) (batch-in-atom [:a] {:d 3 :e 4} [[:b] [:c]])) => {:a {:d 3, :e 4}}

perform batch add and remove operations
(-> (atom {:a {:b 1 :c 2}})
    (batch-in-atom [:a]
                   {:d 3 :e 4}
                   [[:b] [:c]]))
=> {:a {:d 3, :e 4}}
raw docstring

drop-in-atomclj

(drop-in-atom atom path)

drops elements in the atom

(-> (atom {:a {:b 1 :c 2}}) (drop-in-atom [:a :b]) deref) => {:a {:c 2}}

drops elements in the atom

(-> (atom {:a {:b 1 :c 2}})
    (drop-in-atom [:a :b])
    deref)
=> {:a {:c 2}}
raw docstring

keys-in-atomclj

(keys-in-atom atom path)

returns keys in the atom

(-> (atom {:a {:b 1 :c 2}}) (keys-in-atom [:a])) => [:b :c]

returns keys in the atom

(-> (atom {:a {:b 1 :c 2}})
    (keys-in-atom [:a]))
=> [:b :c]
raw docstring

matchclj

(match data query)

matches data according to the query

(match 1 odd?) => true

(match {:a 1} {:a odd?}) => true

matches data according to the query

(match 1 odd?) => true

(match {:a 1} {:a odd?}) => true
raw docstring

peek-in-atomclj

(peek-in-atom atom path)

looks at the value in the atom

(-> (atom {:a {:b :c}}) (peek-in-atom [:a])) => {:b :c}

looks at the value in the atom

(-> (atom {:a {:b :c}})
    (peek-in-atom [:a]))
=> {:b :c}
raw docstring

put-in-atomclj

(put-in-atom atom path v)

puts a value in the atom

(-> (atom {:a {:b 1}}) (put-in-atom [:a] {:c 2}) deref) => {:a {:b 1 :c 2}}

puts a value in the atom

(-> (atom {:a {:b 1}})
    (put-in-atom [:a] {:c 2})
    deref)
=> {:a {:b 1 :c 2}}
raw docstring

select-in-atomclj

(select-in-atom atom path q)

selects the necessary data in the data

(-> (atom {:a {:b 1 :c 2}}) (select-in-atom [:a] even?)) => [[:c 2]]

selects the necessary data in the data

(-> (atom {:a {:b 1 :c 2}})
    (select-in-atom [:a] even?))
=> [[:c 2]]
raw docstring

set-in-atomclj

(set-in-atom atom path v)

drops elements in the atom

(-> (atom {:a {:b 1}}) (set-in-atom [:a] {:c 2}) deref) => {:a {:c 2}}

drops elements in the atom

(-> (atom {:a {:b 1}})
    (set-in-atom [:a] {:c 2})
    deref)
=> {:a {:c 2}}
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close