Try println, prn, pr-str. The only sensible thing is to compare
constructors.

On Friday, January 10, 2014, t x wrote:

> Consider this snipplet of code:
>
>   (. js/console log (type (str "abc")))
>   (. js/console log (type (atom nil)))
>   (. js/console log (type (cljs.core/async 100)))
>
>
> it outputs for me:
>
> function String() { [native code] } app.cljs:13
> function (state,meta,validator,watches){ this.state = state; this.meta =
> meta; this.validator = validator; this.watches = watches;
> this.cljs$lang$protocol_mask$partition0$ = 2153938944;
> this.cljs$lang$protocol_mask$partition1$ = 2; }
>
> This, unfortunately, is not very useful. Thus, my question:
>
> in javascript, is there a way to get the type of an object? (the Java ones
> are a bit more useful, returning things like:
>
> clojure.core.async.impl.channels.ManyToManyChannel
> and java.lang.String
>
> Question:
>
> How do I extract a readable/comparable type from cljs objects?
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to 
> clojure@googlegroups.com<javascript:_e({}, 'cvml', 
> 'clojure@googlegroups.com');>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
> 'clojure%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
> 'clojure%2bunsubscr...@googlegroups.com');>.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to