Liking cljdoc? Tell your friends :D

worklet.core


compile-formclj

(compile-form env form)

Takes env and ClojureScript form and returns compiled JavaScript

Takes env and ClojureScript form and returns compiled JavaScript
sourceraw docstring

env->location-strclj

(env->location-str env)

Takes env and returns location string

'absolute path (line:column)'

Takes env and returns location string

'absolute path (line:column)'
sourceraw docstring

fnclj/smacro

(fn args & body)

Similar to clojure.core/fn in syntax, but emits a worklet function that is meant to be executed on a separate thread in React Native and have access to shared values from outer scope.

(worklet-fn [] #js {:transform #js [#js {:translateY (.. position -value)}]})

Similar to clojure.core/fn in syntax, but emits a worklet function
that is meant to be executed on a separate thread in React Native and
have access to shared values from outer scope.

(worklet-fn []
  #js {:transform #js [#js {:translateY (.. position -value)}]})
sourceraw docstring

form->worklet-fn-strclj

(form->worklet-fn-str args body env locals)

Takes args vector, function body, env and local vars. Returns compiled body as JavaScript string suitable to run as a worklet fn.

Takes args vector, function body, env and local vars.
Returns compiled body as JavaScript string suitable to run as a worklet fn.
sourceraw docstring

globalsclj

source

known-global-var?clj

(known-global-var? sym)
source

locals->closure-mapclj

(locals->closure-map locals)
source

locals->pathsclj

(locals->paths locals)
source

map->js-objclj

(map->js-obj m)
source

preprocess-formclj

(preprocess-form form)

Rewrites some Clojure forms

(-deref x) -> (.-value x) (reset! x v) -> (set! (.-value x) v)

Rewrites some Clojure forms

(-deref x) -> (.-value x)
(reset! x v) -> (set! (.-value x) v)
sourceraw docstring

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

× close