ts-humanize / iBytesN
iBytesN(
bytes,numberOfDigits):string
Defined in: bytes/bytes.ts:99
Produces a human-readable representation of an IEC size.
If numberOfDigits is less than or equal to the number of digits in bytes, the decimal part will be ommited.
See also: parseBytes
number
number
Specifies the total number of digits to output, including the decimal part.
string
IBytesN(82854982, 4) // "79.02 MiB"
IBytesN(123456789, 3) // "118 MiB"
IBytesN(123456789, 6) // "117.738 MiB"