danielberkompas / number

ActionView::Helpers::NumberHelper for Elixir
MIT License
224 stars 37 forks source link

Cannot parse number without affecting precision #61

Open prashantsagrawal opened 1 year ago

prashantsagrawal commented 1 year ago

Issue Title

Cannot parse number without affecting precision

Description

When attempting to delimit a number, it's currently required to specify precision (or the default precision of 2 is used). The goal is to parse a string without affecting the precision of the number.

Example

For instance, given the number 203344.43224455333 and using options [precision: :inf, separator: ".", delimiter: ","], the expected result is: "203,344.43224455333".

Summary

The function should offer the capability to set a "inf" precision, which means that in such cases, precision should remain unaffected.