ClojureScript

Implement printing & equality for the JSValue type

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

Using the JSValue type in Clojure tests is a little bit cumbersome at
the moment. The following test for example is not passing at the
moment, because equality is not defined on JSValue.

(is (= '(js/React.DOM.div #js {})
'(js/React.DOM.div #js {})))

It would be nice if the JSValue type implements at least equality and
tagged literal printing on the Clojure side as well. The attached
patch implements this functionality.

  1. js-value-print.diff
    25/Dec/13 10:10 AM
    2 kB
    Roman Scherer
  2. js-value-print-only.diff
    25/Dec/13 12:53 PM
    1 kB
    Roman Scherer

Activity

Roman Scherer made changes -
Field Original Value New Value
Attachment js-value-print-only.diff [ 12561 ]

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: