1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.formatNumber = void 0;
|
4 | const toBn_js_1 = require("../bn/toBn.js");
|
5 | const formatDecimal_js_1 = require("./formatDecimal.js");
|
6 | const getSeparator_js_1 = require("./getSeparator.js");
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | function formatNumber(value, { locale = 'en' } = {}) {
|
12 | const { thousand } = (0, getSeparator_js_1.getSeparator)(locale);
|
13 | return (0, formatDecimal_js_1.formatDecimal)((0, toBn_js_1.bnToBn)(value).toString(), thousand);
|
14 | }
|
15 | exports.formatNumber = formatNumber;
|