Closed Ph0enixKM closed 2 years ago
This is expected.
What are you trying to accomplish? When you specify ,
as a decimal value, currency.js tries to parse any string inputs with your specified options. If you're trying to format your output string, you can pass the format options just into the format function:
currency("78.00").format({ decimal: "," })
// "$78,00"
Otherwise your input string needs to be the same as the specified format:
currency("78,00", { decimal: ',' }).format()
// "$78,00"
Thank you I must have misunderstood the usage.
Specification
Node version: 17 Currency.js version: 2.0.4
Problem
If we set
','
as the value for thedecimal
field in the settings object - we get a value that is 100 times biggerHow to reproduce
Here is a link to runkit example