Either about:
See README for examples.
Either about: - Targeting a specific platform (Clojure JVM, Clojurescript dev, or Clojurescript release) - Transcending those platforms See README for examples.
(cljs? target)
Is the target
referring to Clojurescript? (Either :cljs/dev
or :cljs/release
).
Is the [[target]] referring to Clojurescript? (Either `:cljs/dev` or `:cljs/release`).
(clojure? target)
Is the target
referring to :clojure
?
Is the [[target]] referring to `:clojure`?
(expand* & clojure-form+)
Also known as an "anonymous macro".
Whether in Clojure JVM or during Clojurescript compilation, the given forms are executed as Clojure JVM and the returned value is expanded just like when using a macro.
See README for a full example.
Also known as an "anonymous macro". Whether in Clojure JVM or during Clojurescript compilation, the given forms are executed as Clojure JVM and the returned value is expanded just like when using a macro. See README for a full example.
(not-cljs-release*)
Must be used within a macro.
Given a macro's &env
and &form
, throws if the target
is :cljs/release
.
Useful for forbidding specific features outside of development.
Thrown exception is an ex-info
with a data map containing:
Keyword | Meaning |
---|---|
:medium/forbidden | The first symbol extracted from the given form |
:medium/form | The given form |
**Must be used within a macro.** Given a macro's `&env` and `&form`, throws if the [[target]] is `:cljs/release`. Useful for forbidding specific features outside of development. Thrown exception is an `ex-info` with a data map containing: | Keyword | Meaning | |---|---| | :medium/forbidden | The first symbol extracted from the given form | | :medium/form | The given form |
(target env)
Passing a macro's &env
, determines the target:
:clojure
:cljs/dev
:cljs/release
Passing a macro's `&env`, determines the target: - `:clojure` - `:cljs/dev` - `:cljs/release`
(target*)
Calls target
. Meant to be used at the REPL, from Clojure/script.
Calls [[target]]. Meant to be used at the REPL, from Clojure/script.
(when-compiling* & clojure-form+)
Similar to expand*
but any returned value is discarded.
Solely useful for any kind of side effect on the JVM regardless of the target platform.
Similar to [[expand*]] but any returned value is discarded. Solely useful for any kind of side effect on the JVM regardless of the target platform.
(when-target* target-request & form+)
Akin to the standard when
macro, executes the given forms when the target
matches
target-request
(either a target
or a collection of them for matching any).
Akin to the standard `when` macro, executes the given forms when the [[target]] matches `target-request` (either a [[target]] or a collection of them for matching any).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close