(size)
| 7 | |
| 8 | // https://stackoverflow.com/a/20732091 |
| 9 | function humanFileSize(size) { |
| 10 | if (size == 0) { return "0 B"; } |
| 11 | var i = Math.floor( Math.log(size) / Math.log(1024) ); |
| 12 | return (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; |
| 13 | } |
| 14 | |
| 15 | function caret(down) { |
| 16 | return down ? "\u25BE" : "\u25B8"; |
no test coverage detected
searching dependent graphs…