mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 18:28:02 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { bnToBn } from '../bn/toBn.js';
|
||||
import { formatDecimal } from './formatDecimal.js';
|
||||
import { getSeparator } from './getSeparator.js';
|
||||
/**
|
||||
* @name formatNumber
|
||||
* @description Formats a number into string format with thousand separators
|
||||
*/
|
||||
export function formatNumber(value, { locale = 'en' } = {}) {
|
||||
const { thousand } = getSeparator(locale);
|
||||
return formatDecimal(bnToBn(value).toString(), thousand);
|
||||
}
|
||||
Reference in New Issue
Block a user