Shared utilities between clojure and clojurescript.
Shared utilities between clojure and clojurescript.
(bigint? x)
Returns true if the supplied x
is a BigInt
, false otherwise.
Returns true if the supplied `x` is a `BigInt`, false otherwise.
(counted f)
(counted f initial-count)
Takes a function and returns a pair of:
Takes a function and returns a pair of: - an atom that keeps track of fn invocation counts, - the instrumented fn
(map-vals f m)
Returns a map of identical type and key set to m
, with each value v
transformed by the supplied functionf
into (f v)
.
Returns a map of identical type and key set to `m`, with each value `v` transformed by the supplied function`f` into `(f v)`.
(re-matches? re s)
Returns true if s matches the regex pattern re, false otherwise.
Returns true if s matches the regex pattern re, false otherwise.
(sci-macro name & body)
Like defmacro
but when emitting cljs, emits a function
with &env and &form prepended to arglists and :sci/macro metadata,
so that the macro can be imported into sci using copy-var.
Like `defmacro` but when emitting cljs, emits a function with &env and &form prepended to arglists and :sci/macro metadata, so that the macro can be imported into sci using copy-var.
(uuid)
Returns a string containing a randomly generated unique identifier.
Returns a string containing a randomly generated unique identifier.
(without-symbol-namespaces x)
Walks x, removing namespaces from any symbols that are found.
Convenient in unit tests, where the distinction between symbols
in clojure.core
vs. cljs.core
is unimportant
Walks x, removing namespaces from any symbols that are found. Convenient in unit tests, where the distinction between symbols in `clojure.core` vs. `cljs.core` is unimportant
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close