@talismn/util 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -188,9 +188,10 @@ const formatPrice = (price, currency, compact) => {
188
188
  style: "currency",
189
189
  currency,
190
190
  currencyDisplay: currency === "usd" ? "narrowSymbol" : "symbol",
191
+ minimumSignificantDigits: 3,
191
192
  maximumSignificantDigits: compact ? price < 1 ? 3 : 4 : undefined,
192
193
  roundingPriority: compact ? "auto" : "morePrecision",
193
- notation: compact && price >= 10_000 ? "compact" : "standard"
194
+ notation: compact ? "compact" : "standard"
194
195
  }).format(price);
195
196
  };
196
197
 
@@ -188,9 +188,10 @@ const formatPrice = (price, currency, compact) => {
188
188
  style: "currency",
189
189
  currency,
190
190
  currencyDisplay: currency === "usd" ? "narrowSymbol" : "symbol",
191
+ minimumSignificantDigits: 3,
191
192
  maximumSignificantDigits: compact ? price < 1 ? 3 : 4 : undefined,
192
193
  roundingPriority: compact ? "auto" : "morePrecision",
193
- notation: compact && price >= 10_000 ? "compact" : "standard"
194
+ notation: compact ? "compact" : "standard"
194
195
  }).format(price);
195
196
  };
196
197
 
@@ -182,9 +182,10 @@ const formatPrice = (price, currency, compact) => {
182
182
  style: "currency",
183
183
  currency,
184
184
  currencyDisplay: currency === "usd" ? "narrowSymbol" : "symbol",
185
+ minimumSignificantDigits: 3,
185
186
  maximumSignificantDigits: compact ? price < 1 ? 3 : 4 : undefined,
186
187
  roundingPriority: compact ? "auto" : "morePrecision",
187
- notation: compact && price >= 10_000 ? "compact" : "standard"
188
+ notation: compact ? "compact" : "standard"
188
189
  }).format(price);
189
190
  };
190
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/util",
3
- "version": "0.3.2",
3
+ "version": "0.4.1",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",