Timeline for answer to ClojureScript - convert arbitrary JavaScript object to Clojure Script map by Aaron Blenkush
Current License: CC BY-SA 4.0
Post Revisions
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 3, 2021 at 18:08 | comment | added | Felipe Cortez |
@NikoNyrh if you do away with the isObject check and trust the caller, you can type hint obj in the function's signature like [^js/Object obj]
|
|
| Mar 15, 2021 at 18:04 | comment | added | NikoNyrh | Any tips on how to get rid of "Cannot infer target type in expression (. goog/object getKeys obj)" warning? | |
| Jul 6, 2020 at 15:55 | comment | added | Aaron Blenkush |
@RobertJBerger, an optimization on that would be to change key on line 8 to (keyword key).
|
|
| Jul 6, 2020 at 3:52 | comment | added | Robert J Berger |
To keywordize, it seemed as easy as wrapping the whole (if ...) with (clojure.walk/keywordize-keys (if ...))
|
|
| Jul 6, 2020 at 2:26 | comment | added | Robert J Berger | This is great! How would you keywordize the keys? | |
| Jun 20, 2020 at 9:12 | history | edited | Community Bot |
Commonmark migration
|
|
| Jul 20, 2018 at 15:27 | history | edited | Aaron Blenkush | CC BY-SA 4.0 |
added 355 characters in body
|
| Jul 20, 2018 at 15:21 | history | edited | Aaron Blenkush | CC BY-SA 4.0 |
added 355 characters in body
|
| Jul 20, 2018 at 15:03 | history | edited | Aaron Blenkush | CC BY-SA 4.0 |
added 9 characters in body
|
| Jul 20, 2018 at 15:01 | comment | added | Aaron Blenkush |
@kamituel, thanks for pointing that out. I have updated my answer to use goog.object/get.
|
|
| Jul 20, 2018 at 9:41 | comment | added | kamituel |
aget should not be used for obtaining values of JS objects: clojurescript.org/news/2017-07-14-checked-array-access
|
|
| Dec 7, 2016 at 23:29 | history | edited | Aaron Blenkush | CC BY-SA 3.0 |
actually use the function I referenced
|
| Dec 7, 2016 at 23:15 | history | answered | Aaron Blenkush | CC BY-SA 3.0 |