infinity-forge 0.42.7 → 0.42.9
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/ui/utils/formatters/format-number-to-currency.d.ts +5 -0
- package/dist/ui/utils/formatters/format-number-to-currency.js +14 -0
- package/dist/ui/utils/formatters/format-number-to-currency.js.map +1 -0
- package/dist/ui/utils/formatters/index.d.ts +1 -0
- package/dist/ui/utils/formatters/index.js +18 -0
- package/dist/ui/utils/formatters/index.js.map +1 -0
- package/dist/ui/utils/index.d.ts +1 -0
- package/dist/ui/utils/index.js +1 -0
- package/dist/ui/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatNumberToCurrency = void 0;
|
|
4
|
+
function formatNumberToCurrency(money, noIcon, options) {
|
|
5
|
+
return Number(money)
|
|
6
|
+
.toLocaleString((options === null || options === void 0 ? void 0 : options.local) || 'pt-BR', {
|
|
7
|
+
minimumFractionDigits: 2,
|
|
8
|
+
style: 'currency',
|
|
9
|
+
currency: (options === null || options === void 0 ? void 0 : options.currency) || 'BRL',
|
|
10
|
+
})
|
|
11
|
+
.replaceAll(noIcon ? (options === null || options === void 0 ? void 0 : options.icon) || 'R$' : '', '');
|
|
12
|
+
}
|
|
13
|
+
exports.formatNumberToCurrency = formatNumberToCurrency;
|
|
14
|
+
//# sourceMappingURL=format-number-to-currency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-number-to-currency.js","sourceRoot":"","sources":["../../../../src/ui/utils/formatters/format-number-to-currency.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sBAAsB,CAClC,KAAsB,EACtB,MAAgB,EAChB,OAAwD;IAExD,OAAO,MAAM,CAAC,KAAK,CAAC;SACjB,cAAc,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,KAAI,OAAO,EAAE;QACzC,qBAAqB,EAAE,CAAC;QACxB,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,KAAK;KACrC,CAAC;SACD,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,KAAI,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACxD,CAAC;AAZH,wDAYG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./format-number-to-currency.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./format-number-to-currency.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/utils/formatters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C"}
|
package/dist/ui/utils/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './format/index.js';
|
|
|
5
5
|
export * from './buffer/index.js';
|
|
6
6
|
export * from './cookies.js';
|
|
7
7
|
export * from './facebook/index.js';
|
|
8
|
+
export * from './formatters/index.js';
|
|
8
9
|
export * from './validations/index.js';
|
|
9
10
|
export * from './disable-scroll.js';
|
|
10
11
|
export * from './scroll-to-top-page.js';
|
package/dist/ui/utils/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./format/index.js"), exports);
|
|
|
21
21
|
__exportStar(require("./buffer/index.js"), exports);
|
|
22
22
|
__exportStar(require("./cookies.js"), exports);
|
|
23
23
|
__exportStar(require("./facebook/index.js"), exports);
|
|
24
|
+
__exportStar(require("./formatters/index.js"), exports);
|
|
24
25
|
__exportStar(require("./validations/index.js"), exports);
|
|
25
26
|
__exportStar(require("./disable-scroll.js"), exports);
|
|
26
27
|
__exportStar(require("./scroll-to-top-page.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB;AACtB,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB;AACzB,6CAA0B;AAC1B,gDAA6B;AAC7B,mDAAgC;AAChC,uDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB;AACtB,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB;AACzB,6CAA0B;AAC1B,+CAA4B;AAC5B,gDAA6B;AAC7B,mDAAgC;AAChC,uDAAoC"}
|