UNPKG

525 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.formatNumber = formatNumber;
7
8var _toBn = require("../bn/toBn");
9
10var _formatDecimal = require("./formatDecimal");
11
12// Copyright 2017-2022 @polkadot/util authors & contributors
13// SPDX-License-Identifier: Apache-2.0
14
15/**
16 * @name formatNumber
17 * @description Formats a number into string format with thousand seperators
18 */
19function formatNumber(value) {
20 return (0, _formatDecimal.formatDecimal)((0, _toBn.bnToBn)(value).toString());
21}
\No newline at end of file