kipcole9 / money

Elixir implementation of Money with Currency
https://hex.pm/packages/ex_money
Other
572 stars 48 forks source link

Allow Options struct in `to_string!/2` too and document it #127

Closed jeroenvisser101 closed 3 years ago

jeroenvisser101 commented 3 years ago

This PR is part of a series of PRs that aim to improve performance by allowing both %Cldr.Number.Format.Options{} structs to be passed as options in place of keyword lists, and to add support for %Cldr.Currency{} structs as alternative for currency codes.

https://github.com/elixir-cldr/cldr_currencies/pull/4 https://github.com/elixir-cldr/cldr_numbers/pull/18 https://github.com/kipcole9/money/pull/127 (this PR)

Support for precompiled option structs was added before, but not to the to_string!/2 function, and this PR aims to add this in both documentation and in typespecs.

kipcole9 commented 3 years ago

Thanks for the PR, much appreciated and gratefully accepted. I have published ex_money 5.5.4 with the following changelog:

Bug Fixes