Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ledgerhq/currencies

Package Overview
Dependencies
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/currencies - npm Package Compare versions

Comparing version 4.7.4 to 4.7.5

9

lib/formatCurrencyUnit.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc