danielberkompas / number

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

number_to_delimited shows 2 decimal places. Readme says otherwise. #43

Closed trentjones21 closed 5 years ago

trentjones21 commented 5 years ago

The readme on this repo has the following as one of the examples

Number.Delimit.number_to_delimited(12345678)
"12,345,678"

However, when I run that exact command in iex I get

Number.Delimit.number_to_delimited(12345678)
"12,345,678.00"

Should there be a discrepancy?

trentjones21 commented 5 years ago

Looks like it defaults to precision: 2. I just needed to add precision: 0. Closing this issue, though maybe the readme should be updated at some point.