I've ran into the problem how to compare two JavaScript objects for deep equality in ClojureScript, because (= var1 var2 var3...) only works on Clojure/ClojureScript collections and numbers.
(= (js-obj "a" 1) (js-obj "a" 1)) ;; => false
While I wrote this question I found the solution... but I'll ask and answer it maybe help others.
Since the "=" function can compare ClojureScript collections, one immediate solutions should be:
Which is ugly, and does not work on instanced objects like.:
The most reliable solution is using the goog.equals method from Google's Closure Library.
In general Google's Closure Library has robust solutions for handling plain JavaScript.