ClojureScript

Allow hashtable lookup used for numbers and strings to be extended to other built-in types

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

...which would enable safe extension of key cljs protocols to types without modifying their prototypes, e.g. CLJS-523.

Activity

Hide
David Nolen added a comment -

Date is the only JS native case that I'm aware of that we don't handle. One tricky bit is that goog.typeOf won't give us the information we need, but I think instanceof should cover us here?

Show
David Nolen added a comment - Date is the only JS native case that I'm aware of that we don't handle. One tricky bit is that goog.typeOf won't give us the information we need, but I think instanceof should cover us here?
Hide
Fogus added a comment -

instanceof or the ever-gruesome toString.call(aDate) == '[object Date]' will work.

Show
Fogus added a comment - instanceof or the ever-gruesome toString.call(aDate) == '[object Date]' will work.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: