bytelabel
Convert byte lengths into a nice formatted string.
Installation
$ npm install bytelabel
Test:
$ npm test
Usage/API
bytelabel(number)
The only argument takes a number assumes that this value is in bytes and returns the size more nicely formatted.
Examples:
var bytelabel = // Parsed values // => '123 B' // => '4.29 KB' // => '21.28 MB' // Rounding // => '123 B' // => '4 KB' // => '21 MB'
License
MIT