MCPcopy Create free account
hub / github.com/1Panel-dev/MaxKB / numberFormat

Function numberFormat

ui/src/utils/common.ts:13–15  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

11}
12
13export function numberFormat(num: number) {
14 return num < 1000 ? toThousands(num): toThousands((num / 1000).toFixed(1)) + 'k'
15}
16
17export function filesize(size: number) {
18 if (!size) return ''

Callers

nothing calls this directly

Calls 1

toThousandsFunction · 0.85

Tested by

no test coverage detected