Skip to content
George Kamtziridis edited this page Oct 23, 2021 · 9 revisions

Welcome to the wiki!

What's the purpose of this library?

At the time of writing there is no concrete solution to the problem of transforming a string representation of a number in a certain locale, to the actual decimal literal Javascript can understand. There are utilities that perform the exact opposite, like Intl.NumberFormat() constructor or the Number.toLocaleString(). Both of those, take into consideration, via an argument, the desired locale output in its BCP 47 language tag and work generically for every locale. However, currently there is no such counterpart. One can find some basic solutions that, almost, any one of them deals with representations that use comma and dot as the thousands and decimal delimiters.

Useful links