Easily convert between storage size units.
NOTICE: we use base 10 instead of base 2 for bit
[IEC 60027-2 A.2 and ISO/IEC 80000]https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes
byteSize('1.5KB') === 12_000byteSize(32_000_000) === '4 MB'byteSize(byteSize('32 Gigabytes')) === '32 GB' Copy
byteSize('1.5KB') === 12_000byteSize(32_000_000) === '4 MB'byteSize(byteSize('32 Gigabytes')) === '32 GB'
Easily convert between storage size units.
NOTICE: we use base 10 instead of base 2 for bit