Liking cljdoc? Tell your friends :D

com.fulcrologic.fulcro.algorithms.bb-support

Babashka-only support shim. Loaded only via #?(:bb ...) requires — never under JVM Clojure or ClojureScript.

Babashka ships a precompiled, partial taoensso.encore that shadows the encore jar (placing the full jar on the classpath does not help). Two problems with that built-in:

  1. It is missing plain fns Fulcro uses: map-vals, remove-vals, dissoc-in, compiling-cljs?.
  2. Its if-let/when-let/catching exist but do not work as macro calls through an :as enc alias.

Rather than de-encore Fulcro's proven :clj/:cljs source, this namespace interns faithful re-implementations into taoensso.encore at load time (interning overrides the broken built-ins), so the existing enc/... call sites work unchanged under babashka.

The macros are intentionally named bb-* (not if-let/when-let) because babashka's SCI special-cases those core names; a bb--prefixed macro avoids that collision, and its value is then interned into taoensso.encore under the real name.

Requiring this namespace installs the patch; it is required (under #?(:bb ...)) by com.fulcrologic.fulcro.algorithms.lookup, which every encore-macro-using namespace requires, so the patch is present before those namespaces are macro-expanded. The patched fns/macros match encore's documented contracts.

Babashka-only support shim. **Loaded only via `#?(:bb ...)` requires — never under JVM
Clojure or ClojureScript.**

Babashka ships a *precompiled, partial* `taoensso.encore` that shadows the encore jar
(placing the full jar on the classpath does not help). Two problems with that built-in:

1. It is **missing** plain fns Fulcro uses: `map-vals`, `remove-vals`, `dissoc-in`,
   `compiling-cljs?`.
2. Its `if-let`/`when-let`/`catching` exist but **do not work** as macro calls through an
   `:as enc` alias.

Rather than de-encore Fulcro's proven `:clj`/`:cljs` source, this namespace `intern`s
faithful re-implementations into `taoensso.encore` at load time (interning overrides the
broken built-ins), so the existing `enc/...` call sites work unchanged under babashka.

The macros are intentionally named `bb-*` (not `if-let`/`when-let`) because babashka's SCI
special-cases those core names; a `bb-`-prefixed macro avoids that collision, and its value
is then interned into `taoensso.encore` under the real name.

Requiring this namespace installs the patch; it is required (under `#?(:bb ...)`) by
`com.fulcrologic.fulcro.algorithms.lookup`, which every encore-macro-using namespace
requires, so the patch is present before those namespaces are macro-expanded. The patched
fns/macros match encore's documented contracts.
raw docstring

bb-catchingcljmacro

(bb-catching expr)
(bb-catching error-type expr)
(bb-catching try-expr error-sym catch-expr)
(bb-catching try-expr error-sym catch-expr finally-expr)
(bb-catching try-expr error-type error-sym catch-expr finally-expr)

Terse cross-platform try/catch. Interned as taoensso.encore/catching (Throwable for the :all case), matching the arities Fulcro uses.

Terse cross-platform try/catch. Interned as `taoensso.encore/catching` (Throwable for the
`:all` case), matching the arities Fulcro uses.
sourceraw docstring

bb-fatalcljmacro

(bb-fatal & args)

babashka stub for taoensso.timbre/fatal (missing in bb's built-in timbre); logs at error level.

babashka stub for `taoensso.timbre/fatal` (missing in bb's built-in timbre); logs at error level.
sourceraw docstring

bb-if-letcljmacro

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

Supersets clojure.core/if-let: multiple bindings + unconditional :let. Interned as taoensso.encore/if-let.

Supersets `clojure.core/if-let`: multiple bindings + unconditional `:let`. Interned as
`taoensso.encore/if-let`.
sourceraw docstring

bb-when-letcljmacro

(bb-when-let bindings & body)

Supersets clojure.core/when-let: multiple bindings + unconditional :let. Interned as taoensso.encore/when-let.

Supersets `clojure.core/when-let`: multiple bindings + unconditional `:let`. Interned as
`taoensso.encore/when-let`.
sourceraw docstring

compiling-cljs?clj

(compiling-cljs?)

Babashka never compiles ClojureScript, so this is always false.

Babashka never compiles ClojureScript, so this is always false.
sourceraw docstring

convert-propsclj

(convert-props & _)
source

create-elementclj

(create-element & _)
source

dissoc-inclj

(dissoc-in m ks)
(dissoc-in m ks dissoc-k)
(dissoc-in m ks dissoc-k & more)

Matches taoensso.encore/dissoc-in for the arities Fulcro uses: [m ks] - dissoc the leaf key of path ks [m ks dissoc-k] - dissoc dissoc-k from the map at path ks [m ks dissoc-k more] - dissoc dissoc-k and each of more from the map at path ks Empty/absent paths are no-ops (the original map is returned).

Matches `taoensso.encore/dissoc-in` for the arities Fulcro uses:
  `[m ks]`               - dissoc the leaf key of path `ks`
  `[m ks dissoc-k]`      - dissoc `dissoc-k` from the map at path `ks`
  `[m ks dissoc-k more]` - dissoc `dissoc-k` and each of `more` from the map at path `ks`
Empty/absent paths are no-ops (the original map is returned).
sourceraw docstring

map-valsclj

(map-vals val-fn m)

Returns ?map with (val-fn v) applied to each value. Matches taoensso.encore/map-vals.

Returns `?map` with `(val-fn v)` applied to each value. Matches `taoensso.encore/map-vals`.
sourceraw docstring

remove-valsclj

(remove-vals val-pred m)

Returns ?map, removing keys for which (val-pred v) is truthy. Matches taoensso.encore/remove-vals.

Returns `?map`, removing keys for which `(val-pred v)` is truthy. Matches
`taoensso.encore/remove-vals`.
sourceraw docstring

wrap-form-elementclj

(wrap-form-element & _)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close