Closed brandonstubbs closed 5 months ago
I don't think this is a correct assumption since JS objects only support string keys
Here is a counter-example from CLJS:
cljs.user=> (js-obj nil 1 "null" 2)
#js {:null 1}
Ok understood. This is another difference from squint compared to Clojurescript/Cherry.
Other keys that will not work:
As squint is using Objects vs Maps this is a good reference of differences https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#objects_vs._maps
For anyone coming across this issue in the future, I used an ES6 map, see playground example
version
v0.7.105
problem
The value
"null"
andnil
conflict in a maprepro
expected behavior
nil
and"null"
should be in the map