Fork me on GitHub
#clojurescript
<
2019-12-16
>
deas13:12:21

Does anyone get value from code coverage on v8 for cljs sources?

Roman Liutikov13:12:45

I don’t see how it is useful in general

Hi14:12:26

how is the easiest to convert ClojureScript mapt to JSON? Or to say any Clojure data object ?

potetm14:12:54

(js/JSON.stringify (clj->js {:foo "bar"}))

4
manutter5121:12:28

Is clj->js lazy? I’ve got code that doesn’t work when calling clj->js, but does work if I print out the result to the console, as an intermediate debugging step.

manutter5121:12:13

(I’m trying to set default values on a multi-select in re-frame, and if I just use clj->js on the default values, they’re not pre-selected like they should be when the component first renders)

lilactown21:12:36

no, it’s not lazy

dogenpunk21:12:42

@manutter51 It doesn’t seem as though it is http://cljs.github.io/api/cljs.core/clj-GTjs Have you tried using the #js literal?

manutter5121:12:59

I don’t think I can use that? I’m populating the options from dynamic values coming back from the server.

manutter5121:12:38

It’s weird. It doesn’t happen all the time, but then if I put in the pprint it seems like it never happens, which makes it hard to debug.

dogenpunk22:12:52

Ah, gotcha. I assumed the value was inline. Can you post the code?