2.0.2 • Published 9 years ago
bytelabel v2.0.2
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 = 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
2.0.2
9 years ago
2.0.1
9 years ago
2.0.0
9 years ago
1.1.1
9 years ago
1.1.0
9 years ago
1.0.3
9 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.0.13
10 years ago
0.0.12
10 years ago
0.0.11
10 years ago
0.0.10
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago