Appearance
@swapped/connect-sdk / format / formatBytes
Function: formatBytes()
formatBytes(
bytes):string
Defined in: src/format/formatBytes.ts:9
Formats a byte count into a human-readable size string (e.g. 1.5KB, 2.0MB).
Parameters
bytes
number
Size in bytes
Returns
string
Formatted byte string via numeral's 0.0b pattern