I'm trying to use Immutable in a project with reactjs and flux.
Let's say I have a .js file with the code
console.log ( Immutable.Map({1: 2}).toString() )
I browserify this script and run it from the browser (Google Chrome), the result is:
"Map { "1": 2 }"
notice that the key, 1, is now a string, not a number.
If I try the same code directly in the console of the site http://facebook.github.io/immutable-js/ I get the correct result:
"Map { 1: 2 }"
Why is this happening and what can I do to get the correct result (key as number) in my script?
I'm using node v0.10.26, Browserify 5.12.0 and immutable 3.7.1