Package Exports
- bytelabel
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bytelabel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bytelabel

Convert byte lengths into a nice formatted string.
Installation
$ npm install bytelabelTest:
$ npm testUsage/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 = require('bytelabel')
// Parsed values
bytelabel(123) // => '123 B'
bytelabel(4398) // => '4.29 KB'
bytelabel(22323445) // => '21.28 MB'
// Rounding
bytelabel(123, {round: true}) // => '123 B'
bytelabel(4398, {round: true}) // => '4 KB'
bytelabel(22323445, {round: true}) // => '21 MB'
License
MIT