forked from fhd/clostache
-
Notifications
You must be signed in to change notification settings - Fork 17
Lambdas for cljs #14
Copy link
Copy link
Open
Description
The readme says this only works in JVM, which I take to mean Clojure only. But based on some experiments, it seem to work fine for ClojureScript too:
(let [d {:text "hello"}]
(render "Text is {{#uppercase}}{{ text }}{{/uppercase}} {{lambda}}"
(merge d
{:uppercase (fn [x] (str/upper-case (mustache/render x d)))
:lambda (fn [] "from inside lambda!!")})))
;; => "Text is HELLO from inside lambda!!"Is there some limitations I should be aware of? of is the doc just out of date?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels