Fork me on GitHub
#cider
<
2022-01-26
>
andrea.crotti16:01:07

is there a way to inspect javascript objects with cider-inspect by any chance?

andrea.crotti16:01:33

would be great to have the same kind of output I see in the console (with dev tools enabled etc) but in Emacs directly

fjolne11:01:08

not sure if inspector supports datafy/nav, but if it would you could use https://github.com/lambdaisland/dom-types otherwise dom-types provide printers, which is better than nothing

Drew Verlee02:01:21

@U0524T275 if you find something let me know.

Drew Verlee02:01:44

I think the answer is fundamentally "no" though. It works in clojure because the reader knows what its looking at in order to create that view. And you know that view means.

Drew Verlee02:01:51

In js, code isn't data.

Drew Verlee02:01:12

at best it can hand you a dump of a big string

Drew Verlee02:01:56

what you can easily search in JS is the parts of code that are more data like, or at least thats how it feels, i have never really thought about it.

andrea.crotti09:01:03

well it is certainly possible, because the output I see in the console (with devtools etc) is pretty much perfect

andrea.crotti09:01:35

I just want to see data if it's data and a mention to what it is otherwise maybe

andrea.crotti09:01:16

so I can just do a js/console.log and I see a nice output, but would just be amazing if I could see that directly with cider inspect or similar