forked from sombochea/verdaccio-ui
chore: sync with 4.x webui
This commit is contained in:
5
src/utils/file-size.js
Normal file
5
src/utils/file-size.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default function fileSizeSI(a, b, c, d, e) {
|
||||
return (b = Math, c = b.log, d = 1e3, e = c(a) / c(d) | 0, a / b.pow(d, e)).toFixed(2)
|
||||
+ ' ' + (e ? 'kMGTPEZY'[--e] + 'B' : 'Bytes');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user