Dintero / money

Utils for dealing with monetary amounts
MIT License
35 stars 0 forks source link

The codes from `currency-codes` are out-of-date #217

Open JstnMcBrd opened 3 months ago

JstnMcBrd commented 3 months ago

The currency-codes package is 4 years out-of-date and looks like it is dead. The ISO 4217 standard has had many updates since that time, but the package does not reflect them.

That could result in this package throwing errors when trying to find the decimal value of legitimate currencies that currency-codes does not know about.

frodeaa commented 3 months ago

We can probably replace the dependency with Intl.NumberFormat.resolvedOptions, the cons is that its currency support is limited by the host

See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/resolvedOptions

JstnMcBrd commented 3 months ago

I did a quick search and found some options you could consider:

frodeaa commented 2 months ago

I think maybe a change where you can bring your own mapping could be useful.

It is not a problem to use a currency-codes module that does not update regulary as there are probably few changes to the currencies and for most use case it is only a limited currencies that a user will care about