Liking cljdoc? Tell your friends :D

donut.sugar.utils


capitalize-wordsclj/s

(capitalize-words s)

Capitalize every word in a string

Capitalize every word in a string
raw docstring

clj-kvarclj/s

(clj-kvar var-name)

Given a namespaced keyword, look up the corresponding var in clj compilation or return a keyword in cljs compilation.

Given a namespaced keyword, look up the corresponding var in clj compilation or
return a keyword in cljs compilation.
raw docstring

deep-mergeclj/s

(deep-merge db m)

Like merge, but merges maps recursively

Like merge, but merges maps recursively
raw docstring

deep-merge-withclj/s

(deep-merge-with f & maps)

Like merge-with, but merges maps recursively, applying the given fn only when there's a non-map at a particular level. (deep-merge-with + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4} {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}}) -> {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}

Like merge-with, but merges maps recursively, applying the given fn
only when there's a non-map at a particular level.
(deep-merge-with + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4}
                   {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}})
-> {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}
raw docstring

default-valsclj/s

(default-vals x defaul-val-map)

dissoc-inclj/s

(dissoc-in m p)

Remove value in m at p

Remove value in `m` at `p`
raw docstring

feedbackclj/s

(feedback spec data & [feedback-humanize-opts])

feedback-humanizeclj/s

(feedback-humanize explanation)
(feedback-humanize {:keys [_value errors] :as explanation} options)

Humanized a explanation. Accepts the following options:

  • :wrap, a function of error -> message, defaulting to :message
  • :resolve, a function of explanation error options -> path message
Humanized a explanation. Accepts the following options:
- `:wrap`, a function of `error -> message`, defaulting to `:message`
- `:resolve`, a function of `explanation error options -> path message`
raw docstring

flatvclj/s

(flatv & args)

fmtclj/s


full-nameclj/s

(full-name k)

full string representation of a keyword: :x/y => "x/y" :y => "y"

full string representation of a keyword:
:x/y => "x/y"
:y => "y"
raw docstring

kebabclj/s

(kebab s)

Replace non-alphanumeric characters with hyphens

Replace non-alphanumeric characters with hyphens
raw docstring

key-byclj/s

(key-by k xs)

kw-titleclj/s

(kw-title kw)

Turn a keyword into a capitalized string

Turn a keyword into a capitalized string
raw docstring

move-keysclj/s

(move-keys m ks path)

if keys are present at top level, place them in a nested map

if keys are present at top level, place them in a nested map
raw docstring

pluralizeclj/s

(pluralize s n)

projection?clj/s

(projection? x y)

Is every value in x present in y?

Is every value in x present in y?
raw docstring

set-toggleclj/s

(set-toggle s val)

Toggle val's membership in set s

Toggle `val`'s membership in set `s`
raw docstring

slashclj/s

(slash name)

replace dots with slashes in namespace to create a string that's route-friendly

replace dots with slashes in namespace to create a string that's
route-friendly
raw docstring

slugifyclj/s

(slugify txt & [seg-count])

strkclj/s

(strk & xs)

Like str but with keywords

Like `str` but with keywords
raw docstring

toggleclj/s

(toggle v x y)

update-many-valsclj/s

(update-many-vals x update-map)

Takes a map to be updated, x, and a map of {[k1 k2 k3] update-fn-1 [k4 k5 k6] update-fn-2} such that such that k1, k2, k3 are updated using update-fn-1 and k4, k5, k6 are updated using update-fn-2

Takes a map to be updated, x, and a map of
{[k1 k2 k3] update-fn-1
 [k4 k5 k6] update-fn-2}
such that such that k1, k2, k3 are updated using update-fn-1
and k4, k5, k6 are updated using update-fn-2
raw docstring

validate-with-throwclj/s

(validate-with-throw schema value & [message extra-ex-info])

vectorizeclj/s

(vectorize maybe-sequential)

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

× close