@drawbridge/drawbridge-utils 0.0.52 → 0.0.53
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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -263,12 +263,12 @@ var formatCurrency = ({
|
|
|
263
263
|
const resolvedLocale = locale || (typeof navigator !== "undefined" ? navigator == null ? void 0 : navigator.language : null) || "en-US";
|
|
264
264
|
const options = {
|
|
265
265
|
currency: code2,
|
|
266
|
+
currencyDisplay: "narrowSymbol",
|
|
266
267
|
minimumFractionDigits: digits,
|
|
267
268
|
maximumFractionDigits: digits,
|
|
268
269
|
style: "currency"
|
|
269
270
|
};
|
|
270
271
|
if (display === "parts") {
|
|
271
|
-
options.currencyDisplay = "narrowSymbol";
|
|
272
272
|
const parts = new Intl.NumberFormat(resolvedLocale, options).formatToParts(value);
|
|
273
273
|
const symbol = ((_a = parts.find((p) => p.type === "currency")) == null ? void 0 : _a.value) || "";
|
|
274
274
|
const number = parts.filter((p) => p.type !== "currency" && p.type !== "literal").map((p) => p.value).join("");
|
package/dist/index.d.cts
CHANGED
|
@@ -241,6 +241,7 @@ const formatCurrency = ({
|
|
|
241
241
|
|
|
242
242
|
const options = {
|
|
243
243
|
currency : code,
|
|
244
|
+
currencyDisplay : 'narrowSymbol',
|
|
244
245
|
minimumFractionDigits : digits,
|
|
245
246
|
maximumFractionDigits : digits,
|
|
246
247
|
style : 'currency'
|
|
@@ -248,8 +249,6 @@ const formatCurrency = ({
|
|
|
248
249
|
|
|
249
250
|
if( display === 'parts' ){
|
|
250
251
|
|
|
251
|
-
options.currencyDisplay = 'narrowSymbol';
|
|
252
|
-
|
|
253
252
|
const parts = new Intl.NumberFormat( resolvedLocale, options ).formatToParts( value );
|
|
254
253
|
|
|
255
254
|
const symbol = parts.find( ( p ) => p.type === 'currency' )?.value || '';
|
package/dist/index.d.ts
CHANGED
|
@@ -241,6 +241,7 @@ const formatCurrency = ({
|
|
|
241
241
|
|
|
242
242
|
const options = {
|
|
243
243
|
currency : code,
|
|
244
|
+
currencyDisplay : 'narrowSymbol',
|
|
244
245
|
minimumFractionDigits : digits,
|
|
245
246
|
maximumFractionDigits : digits,
|
|
246
247
|
style : 'currency'
|
|
@@ -248,8 +249,6 @@ const formatCurrency = ({
|
|
|
248
249
|
|
|
249
250
|
if( display === 'parts' ){
|
|
250
251
|
|
|
251
|
-
options.currencyDisplay = 'narrowSymbol';
|
|
252
|
-
|
|
253
252
|
const parts = new Intl.NumberFormat( resolvedLocale, options ).formatToParts( value );
|
|
254
253
|
|
|
255
254
|
const symbol = parts.find( ( p ) => p.type === 'currency' )?.value || '';
|
package/dist/index.js
CHANGED
|
@@ -219,12 +219,12 @@ var formatCurrency = ({
|
|
|
219
219
|
const resolvedLocale = locale || (typeof navigator !== "undefined" ? navigator == null ? void 0 : navigator.language : null) || "en-US";
|
|
220
220
|
const options = {
|
|
221
221
|
currency: code2,
|
|
222
|
+
currencyDisplay: "narrowSymbol",
|
|
222
223
|
minimumFractionDigits: digits,
|
|
223
224
|
maximumFractionDigits: digits,
|
|
224
225
|
style: "currency"
|
|
225
226
|
};
|
|
226
227
|
if (display === "parts") {
|
|
227
|
-
options.currencyDisplay = "narrowSymbol";
|
|
228
228
|
const parts = new Intl.NumberFormat(resolvedLocale, options).formatToParts(value);
|
|
229
229
|
const symbol = ((_a = parts.find((p) => p.type === "currency")) == null ? void 0 : _a.value) || "";
|
|
230
230
|
const number = parts.filter((p) => p.type !== "currency" && p.type !== "literal").map((p) => p.value).join("");
|
package/package.json
CHANGED