@ledgerhq/currencies
Advanced tools
Comparing version 4.7.4 to 4.7.5
@@ -31,3 +31,4 @@ "use strict"; | ||
showAllDigits: false, | ||
disableRounding: false | ||
disableRounding: false, | ||
useGrouping: true | ||
}; | ||
@@ -70,3 +71,4 @@ | ||
locale = _defaultFormatOptions.locale, | ||
disableRounding = _defaultFormatOptions.disableRounding; | ||
disableRounding = _defaultFormatOptions.disableRounding, | ||
useGrouping = _defaultFormatOptions.useGrouping; | ||
@@ -88,3 +90,4 @@ var magnitude = unit.magnitude, | ||
maximumFractionDigits: maximumFractionDigits, | ||
minimumFractionDigits: minimumFractionDigits | ||
minimumFractionDigits: minimumFractionDigits, | ||
useGrouping: useGrouping | ||
}), | ||
@@ -91,0 +94,0 @@ separator: nonBreakableSpace |
{ | ||
"name": "@ledgerhq/currencies", | ||
"version": "4.7.4", | ||
"version": "4.7.5", | ||
"description": "Ledger Hardware Wallet currencies dataset", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -12,3 +12,4 @@ //@flow | ||
showAllDigits: false, | ||
disableRounding: false | ||
disableRounding: false, | ||
useGrouping: true | ||
}; | ||
@@ -56,3 +57,10 @@ | ||
): FormatFragment[] { | ||
const { showCode, alwaysShowSign, showAllDigits, locale, disableRounding } = { | ||
const { | ||
showCode, | ||
alwaysShowSign, | ||
showAllDigits, | ||
locale, | ||
disableRounding, | ||
useGrouping | ||
} = { | ||
...defaultFormatOptions, | ||
@@ -83,3 +91,4 @@ ...unit, | ||
maximumFractionDigits, | ||
minimumFractionDigits | ||
minimumFractionDigits, | ||
useGrouping | ||
}), | ||
@@ -86,0 +95,0 @@ separator: nonBreakableSpace |
@@ -143,2 +143,11 @@ //@flow | ||
test("formatter useGrouping", () => { | ||
expect( | ||
formatCurrencyUnit(getFiatUnit("EUR"), 1234500, { useGrouping: true }) | ||
).toBe("12,345.00"); | ||
expect( | ||
formatCurrencyUnit(getFiatUnit("EUR"), 1234500, { useGrouping: false }) | ||
).toBe("12345.00"); | ||
}); | ||
test("formatter can change locale", () => { | ||
@@ -145,0 +154,0 @@ expect( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
588819
10114