Fork me on GitHub
#clojurescript
<
2024-05-24
>
Drew Verlee15:05:23

Whats the equivalent of clojure.reflect for clojurescript? I can console log a js object and look at its properties and methods, but is there a way to get that information in my repl?

p-himik16:05:29

Object.keys and all its friends. The experience will most likely be miserable compared to viewing an object via a JS console or some other tool that knows about JS objects and how they work.

👍 1
Drew Verlee16:05:02

What do you use? Js console?

p-himik16:05:41

Yes.

👍 1
Chris McCormick18:05:24

This may not be what you're asking for but binaryage/cljs-devtools let's you console.log ClojureScript objects and get them in a nicely represented collapsible tree like a JS object.

👍 1
dazld12:05:14

console.dir is also a thing - it’ll usually present a navigable object, where .log might not