(bytes)
| 633 | }, |
| 634 | |
| 635 | bytes(bytes) { |
| 636 | if (bytes === 0) return '0 B'; |
| 637 | const k = 1024; |
| 638 | const sizes = ['B', 'KB', 'MB', 'GB']; |
| 639 | const i = Math.floor(Math.log(bytes) / Math.log(k)); |
| 640 | return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]; |
| 641 | }, |
| 642 | |
| 643 | number(num) { |
| 644 | if (num === null || num === undefined) return '-'; |
nothing calls this directly
no outgoing calls
no test coverage detected