0.1.2 • Published 7 years ago
pointful v0.1.2
pointful
Teeny-tiny number-format-detecting doodad.
Sometimes we want to know the formatting of a number - say 1,000,000.01, or 1 000 000,01 or any other ridiculous combination that humans have come up with.
Give Pointful a number (as a string) and it'll attempt to tell you the thousands delimiter, decimal point symbol and number of decimal places.
It won't always succeed, because we can't always tell for numbers like 1,000 without knowing the locale/format used - it could be "one thousand" or "one and three decimal places", depending on the locale conventions used to create the string.
This is the kind of thing where here's probably some stupid magic word that does all this for you, but if it does exist then I can't find it anywhere.
#TODO
- docs/demo
- performance
analyse an array of numbers- add extra configurations - unicode numerics, arabic separators etc
- strip unwanted symbols such as $/bn