Liking cljdoc? Tell your friends :D

helins.medium

Either about:

  • Targeting a specific platform (Clojure JVM, Clojurescript dev, or Clojurescript release)
  • Transcending those platforms

See README for examples.

Either about:

- Targeting a specific platform (Clojure JVM, Clojurescript dev, or Clojurescript
release)
- Transcending those platforms

See README for examples.
raw docstring

cljs?clj/s

(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`).
sourceraw docstring

clojure?clj/s

(clojure? target)

Is the target referring to :clojure?

Is the [[target]] referring to `:clojure`?
sourceraw docstring

expand*clj/smacro

(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.
sourceraw docstring

not-cljs-release*clj/smacro

(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:

KeywordMeaning
:medium/forbiddenThe first symbol extracted from the given form
:medium/formThe 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 |
sourceraw docstring

targetclj

(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`
sourceraw docstring

target*clj/smacro

(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.
sourceraw docstring

when-compiling*clj/smacro

(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.
sourceraw docstring

when-target*clj/smacro

(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).
sourceraw docstring

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

× close