Liking cljdoc? Tell your friends :D

toolbelt.core


all-some?clj/s

(all-some? xseq)

Given seq as xseq returns true if all its items are not nils, otherwise false

Given seq as xseq returns true if all its items are not nils, otherwise false
sourceraw docstring

assoc-someclj/s

(assoc-some m & kvs)

Like assoc but only assocs when value is non-nil.

Like assoc but only assocs when value is non-nil.
sourceraw docstring

assoc-whenclj/s

(assoc-when m & kvs)

Like assoc but only assocs when value is truthy.

Like assoc but only assocs when value is truthy.
sourceraw docstring

conj-whenclj/s

(conj-when coll x)
(conj-when coll x & xs)

Like conj but ignores non-truthy values.

Like conj but ignores non-truthy values.
sourceraw docstring

dissoc-inclj/s

(dissoc-in m [k & ks])

Dissociate this keyseq from m, removing any empty maps created as a result (including at the top-level).

Dissociate this keyseq from m, removing any empty maps created as a result
(including at the top-level).
sourceraw docstring

dissoc-whenclj/s

(dissoc-when m korks)
(dissoc-when m korks pred)

Dissoc from `korks' when the value is falsy, or when the optionally supplied predicate produces a falsy value when invoked on the value.

Dissoc from `korks' when the value is falsy, or when the optionally supplied
predicate produces a falsy value when invoked on the value.
sourceraw docstring

distinct-byclj/s

(distinct-by f xs)

Returns elements of xs which return unique values according to f. If multiple elements of xs return the same value under f, the first is returned

Returns elements of xs which return unique values according to f. If multiple
elements of xs return the same value under f, the first is returned
sourceraw docstring

find-byclj/s

(find-by pred coll)

Return the first element in coll matching pred; otherwise nil.

Return the first element in `coll` matching `pred`; otherwise nil.
sourceraw docstring

not-empty?clj/s

source

remove-atclj/s

(remove-at v i)

Remove element at index i from vector v.

Remove element at index `i` from vector `v`.
sourceraw docstring

roundclj/s

(round x & [precision])
source (clj)source (cljs)

str->intclj/s

(str->int s)
(str->int m & ks)

Converts a string to an integer. If the input is already a number, returns the input.

Converts a string to an integer. If the input is already a number,
returns the input.
sourceraw docstring

strip-namespacesclj/s

(strip-namespaces m)

Remove all namespaces from keyword keys.

Remove all namespaces from keyword keys.
sourceraw docstring

throwable?clj/s

(throwable? x)
source (clj)source (cljs)

transform-when-key-existsclj/s

(transform-when-key-exists source transformations)

(transform-when-key-exists {:a 1 :b 2} {:a #(inc %) :c #(inc %)})

=> {:a 2 :b 2}

(transform-when-key-exists
  {:a 1
   :b 2}
  {:a #(inc %)
   :c #(inc %)})

=> {:a 2 :b 2}
sourceraw docstring

update-in-someclj/s

(update-in-some m key-seq f & args)

Like update-in but returns m unchanged if key-seq is not nil.

Like update-in but returns m unchanged if key-seq is not nil.
sourceraw docstring

update-in-whenclj/s

(update-in-when m key-seq f & args)

Like update-in but returns m unchanged if key-seq is not present.

Like update-in but returns m unchanged if key-seq is not present.
sourceraw docstring

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

× close