Skip to content

How to use bean and ->clj on objects like js/Error? #90

Open
@introom

Description

For now, for the following code:

(def e (js/Error. "test string"))
;; 1
(bean/e) 
;; 2
(->clj/e)
  1. gives
{:clojure$core$protocols$Datafiable$ #js {}, :clojure$core$protocols$Datafiable$datafy$arity$1 #object[Function]
  1. gives
#object[Error Error: test string]

Would be better if it can give things like

{"message":foo,  "line":foo,  "column":foo,  "stack":foo}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions