Liking cljdoc? Tell your friends :D

tol.core


->intclj/s

(->int value)

Coerce a given value as integer. If the value is not a number, returns nil.

Coerce a given `value` as integer. If the `value` is not a number, returns `nil`.
sourceraw docstring

->uuidclj/s

(->uuid value)

Coerce a given value as java.util.UUID. When the value is not a valid UUID, it returns nil. In ClojureScript there is not UUID class/function (not even in Google Closure Library). Thus in ClojureScript it returns just string value for non-blank value.

Coerce a given `value` as `java.util.UUID`. When the `value` is not a valid UUID, it returns `nil`.
In ClojureScript there is not UUID class/function (not even in Google Closure Library). Thus in ClojureScript
it returns just `string` value for non-blank `value`.
sourceraw docstring

case+clj/smacro

(case+ e & clauses)

Same as case, but evaluates dispatch values, needed for referring to class and defined constants as well as java.util.Enum instances.

Inspirated by: https://github.com/damballa/abracad/blob/master/src/clojure/abracad/avro/util.clj

Same as case, but evaluates dispatch values, needed for referring to class and defined constants
as well as java.util.Enum instances.

Inspirated by: https://github.com/damballa/abracad/blob/master/src/clojure/abracad/avro/util.clj
sourceraw docstring

if-let*clj/smacro

(if-let* bindings then)
(if-let* bindings then else)

Taken from https://clojuredocs.org/clojure.core/if-let. It's if-let with multiple bindings. It allows to flatten and simplify some code nesting, for instance: From (if-let [some-x (x)] (if-let [some-y (y)] (if-let [some-z (z)] :found :not-found) :not-found) :not-found) into (if-let* [some-x (x) some-y (y) some-z (z)] :found :not-found)

It doesn't work in ClojureScript.

Taken from https://clojuredocs.org/clojure.core/if-let. It's if-let with multiple bindings.
It allows to flatten and simplify some code nesting, for instance:
From
(if-let [some-x (x)]
  (if-let [some-y (y)]
    (if-let [some-z (z)]
      :found
      :not-found)
    :not-found)
  :not-found)
into
(if-let* [some-x (x)
          some-y (y)
          some-z (z)]
  :found
  :not-found)

It doesn't work in ClojureScript.
sourceraw docstring

lowerfclj/s

Lower cases first character of a given value. It's safe, when the value is nil or empty string returns nil, otherwise string.

Lower cases first character of a given `value`. It's safe, when the `value` is `nil` or empty `string` returns `nil`,
otherwise `string.`
sourceraw docstring

non-blankclj/s

(non-blank input)

Return a given input when it isn't nil. Otherwise nil is returned. It's useful for some-> macros.

Return a given `input` when it isn't `nil`. Otherwise `nil` is returned. It's useful for `some->` macros.
sourceraw docstring

update-keysclj/s

(update-keys f m)
(update-keys f x m)
(update-keys f x y m)
(update-keys f x y z m)
(update-keys f x y z more m)

Applies a given function f on every key in a given associative structure m, where f is a function that will take a key-name and any supplied args and return new value.

Applies a given function `f` on every key in a given associative structure `m`, where `f` is a function
that will take a key-name and any supplied args and return new value.
sourceraw docstring

update-valsclj/s

(update-vals f coll)

Applies a given function f on every value in a given coll.

Applies a given function `f` on every value in a given `coll`.
sourceraw docstring

update-valuesclj/sdeprecated

source

upperfclj/s

Upper cases first character of a given value. It's safe, when the value is nil or empty string returns nil, otherwise string.

Upper cases first character of a given `value`. It's safe, when the `value` is `nil` or empty `string` returns `nil`,
otherwise `string.`
sourceraw docstring

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

× close