pretty-file-byte
v0.0.1
Published
``` $ npm install --save pretty-file-byte ```
Downloads
2
Maintainers
Readme
Install
$ npm install --save pretty-file-byte
Usage
const prettyByte = require('pretty-file-byte');
prettyByte(1337);
//=> '1.34 kB'
prettyByte(100);
//=> '100 B'
prettyByte(1020,'B');
//=> '1020 B'
prettyByte(1020,'KB');
//=> '1.02 KB'