I hereby claim:
- I am imchrislawrence on github.
- I am imchrislawrence (https://keybase.io/imchrislawrence) on keybase.
- I have a public key ASAa6psjHjJDW7aJtzdXH1UfLfFYbMp9tbZrG5sF46zSsQo
To claim this, I am signing this object:
function formatBytes(bytes,decimals) { | |
if(bytes == 0) return '0 Bytes'; | |
var k = 1024, | |
dm = decimals || 2, | |
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], | |
i = Math.floor(Math.log(bytes) / Math.log(k)); | |
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; | |
} | |
// Usage: |
I hereby claim:
To claim this, I am signing this object: