Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:NBlocks: Difference between revisions

From Hacks Guide Wiki
No edit summary
No edit summary
 
Line 41: Line 41:
function p.raw_format_bytes(bytes)
function p.raw_format_bytes(bytes)
-- this needs to do bytes, kib, and gib too
-- this needs to do bytes, kib, and gib too
local formatted_size, unit = get_display_unit(bytes)
local formatted_size, unit = get_display_unit(tonumber(bytes))
return string.format("%.2f", formatted_size) .. ' ' .. unit
return string.format("%.2f", formatted_size) .. ' ' .. unit
end
end