Since some i18n doesn't use comma as a thousand-separator, the locale should be explicitly stated to one which uses comma as a separator (e.g. en-US).
Before:
After:
In-Depth:
The reason the previous failed and displayed an additional 0 is because with my locale (which is Sweden), we use " " as the thousand separator, and when converting the localeString (in this case "10 159") to the array we would get [1, 0, 0, 1, 5, 9] since Number(" ") = 0.
Closes #34.
Since some i18n doesn't use comma as a thousand-separator, the locale should be explicitly stated to one which uses comma as a separator (e.g. en-US).
Before:
After:
In-Depth:
The reason the previous failed and displayed an additional 0 is because with my locale (which is Sweden), we use " " as the thousand separator, and when converting the localeString (in this case "10 159") to the array we would get [1, 0, 0, 1, 5, 9] since
Number(" ") = 0
.