Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/phuryn/claude-usage
/ fmt
Function
fmt
cli.py:69–74 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
67
)
68
69
def
fmt(n):
70
if
n >= 1_000_000:
71
return
f
"{n/1_000_000:.2f}M"
72
if
n >= 1_000:
73
return
f
"{n/1_000:.1f}K"
74
return
str(n)
75
76
def
fmt_cost(c):
77
return
f
"${c:.4f}"
Callers
6
test_millions
Method · 0.90
test_thousands
Method · 0.90
test_small_numbers
Method · 0.90
cmd_today
Function · 0.85
cmd_week
Function · 0.85
cmd_stats
Function · 0.85
Calls
no outgoing calls
Tested by
3
test_millions
Method · 0.72
test_thousands
Method · 0.72
test_small_numbers
Method · 0.72