Liking cljdoc? Tell your friends :D

io.jesi.backpack.env


cljs?clj/s

(cljs? env)

Take the &env from a macro, and tell whether we are expanding into CLJS.

Take the &env from a macro, and tell whether we are expanding into CLJS.
sourceraw docstring

converterclj/smultimethod

Platform specific converters. Takes the env (from &env or platform keyword) and returns a converter function. The converter function takes a symbol and returns the platform specific version of that symbol.

Platform specific converters.
Takes the `env` (from `&env` or platform keyword) and returns a converter function.
The converter function takes a symbol and returns the platform specific version of that symbol.
sourceraw docstring

platformsclj/s

An atom containing the platform specific predicates. Is an map of predicates, and their platform keyword value. The predicate should take a macro &env and return a boolean. See https://clojure.org/guides/reader_conditionals for platform keywords.

An atom containing the platform specific predicates. Is an map of predicates,
and their platform keyword value. The predicate should take a macro `&env` and return a
boolean. See https://clojure.org/guides/reader_conditionals for platform keywords.
sourceraw docstring

symbolclj/s

(symbol env sym)

Takes the target env (from &env or platform keyword), and a quoted symbol. Transforms the symbol to platform specific symbol.

(symbol :cljs 'clojure.core.async) => cljs.core.async

Takes the target `env` (from `&env` or platform keyword), and a quoted symbol.
Transforms the symbol to platform specific symbol.

`(symbol :cljs 'clojure.core.async)` => `cljs.core.async`
sourceraw docstring

transformclj/smacro

(transform quoted-form)

Transforms the symbols in a quoted form to platform specific symbols. Takes a quoted-form to be transformed. Use this in macros. e.g. (defmacro go [& body](env/transform (async/go ~@body)))`

WARNING: Will throw StackOverflowError for deeply nested forms. Use io.jesi.backpack.env/symbol to transform individual symbols

Transforms the symbols in a quoted form to platform specific symbols.
Takes a `quoted-form` to be transformed. Use this in macros.
e.g. `(defmacro go [& body] `(env/transform (async/go ~@body)))`

WARNING: Will throw StackOverflowError for deeply nested forms.
Use `io.jesi.backpack.env/symbol` to transform individual symbols
sourceraw docstring

transform*clj/s

(transform* env quoted-form)

Transforms the symbols in a quoted form to platform specific symbols. Takes an env (from &env or platform keyword), and a quoted-form to be transformed.

WARNING: Will throw StackOverflowError for deeply nested forms Use io.jesi.backpack.env/symbol to transform individual symbols

Transforms the symbols in a quoted form to platform specific symbols.
Takes an `env` (from `&env` or platform keyword), and a `quoted-form`
to be transformed.

WARNING: Will throw StackOverflowError for deeply nested forms
Use `io.jesi.backpack.env/symbol` to transform individual symbols
sourceraw docstring

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

× close