@riocrypto/common 1.0.910 → 1.0.911

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,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.numberWithCommas = void 0;
4
+ const numberWithCommas = (x, fixedNumber = 2) => {
5
+ return x
6
+ .toFixed(fixedNumber)
7
+ .toString()
8
+ .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
9
+ };
10
+ 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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.910",
3
+ "version": "1.0.911",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",