tiny node.js module to get human readable file size from byte count
MIT License
Tiny module to get a human readable file size from a byte count.
var humanSize = require('human-size');
console.log(humanSize(10 * 1024 * 1024));
// prints "10MB"
console.log(humanSize(10 * 1024 * 1024, 2));
// prints "10.00MB"
console.log(humanSize(106168));
// prints "103KB"
console.log(humanSize(106168, 2));
// prints "103.68KB"