MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / formatNumber

Function formatNumber

static/utils.ts:109–115  ·  view source on GitHub ↗
(num: bigInt.BigInteger, base: number, chunkSize: number)

Source from the content-addressed store, hash-verified

107
108export function getNumericToolTip(value: string, digitSeparator?: string): string | null {
109 const formatNumber = (num: bigInt.BigInteger, base: number, chunkSize: number) => {
110 const numberString = num.toString(base).toUpperCase();
111 if (digitSeparator !== undefined) {
112 return addDigitSeparator(numberString, digitSeparator, chunkSize);
113 }
114 return numberString;
115 };
116 const numericValue = parseNumericValue(value);
117 if (numericValue === null) return null;
118

Callers 1

getNumericToolTipFunction · 0.85

Calls 2

addDigitSeparatorFunction · 0.85
toStringMethod · 0.80

Tested by

no test coverage detected