@riocrypto/common 1.0.910 → 1.0.912
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const numberWithCommas: (x: number, fixedNumber?: number) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.numberWithCommas = void 0;
|
|
4
|
+
const numberWithCommas = (x, fixedNumber = 2) => {
|
|
5
|
+
const formattedNumber = x.toLocaleString(undefined, {
|
|
6
|
+
minimumFractionDigits: fixedNumber,
|
|
7
|
+
maximumFractionDigits: fixedNumber,
|
|
8
|
+
});
|
|
9
|
+
return formattedNumber;
|
|
10
|
+
};
|
|
11
|
+
exports.numberWithCommas = numberWithCommas;
|
package/build/index.d.ts
CHANGED
|
@@ -177,6 +177,7 @@ export * from "./helpers/humanize-order-status";
|
|
|
177
177
|
export * from "./helpers/humanize-kyc-status";
|
|
178
178
|
export * from "./helpers/format-transaction-hash";
|
|
179
179
|
export * from "./helpers/round-to-decimals";
|
|
180
|
+
export * from "./helpers/number-with-commas";
|
|
180
181
|
export * from "./clients/rio-client";
|
|
181
182
|
export * from "./clients/rio-admin-client";
|
|
182
183
|
export * from "./constants/mexico-fiscal-regimens";
|
package/build/index.js
CHANGED
|
@@ -193,6 +193,7 @@ __exportStar(require("./helpers/humanize-order-status"), exports);
|
|
|
193
193
|
__exportStar(require("./helpers/humanize-kyc-status"), exports);
|
|
194
194
|
__exportStar(require("./helpers/format-transaction-hash"), exports);
|
|
195
195
|
__exportStar(require("./helpers/round-to-decimals"), exports);
|
|
196
|
+
__exportStar(require("./helpers/number-with-commas"), exports);
|
|
196
197
|
__exportStar(require("./clients/rio-client"), exports);
|
|
197
198
|
__exportStar(require("./clients/rio-admin-client"), exports);
|
|
198
199
|
__exportStar(require("./constants/mexico-fiscal-regimens"), exports);
|