pretty-bytes diff 1024
Fork byConvert bytes to a human readable string:
1337
→1.31 kB
Useful for displaying file sizes for humans.
Note that it uses base-1024 (eg. kibibyte).
Read about the difference between kilobyte and kibibyte.
Install
$ npm install --save pretty-byte
Usage
const prettyByte = ; ;//=> '1.31 kB' ;//=> '100 B'
License
MIT