We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nedtior
registerUI
浏览器端的文件处理
执行上下文
变量对象
作用域链
function getFileSizeFormat(nBytes) { var sOutput = nBytes + " bytes"; for (var aMultiples = ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"], nMultiple = 0, nApprox = nBytes / 1024; nApprox > 1; nApprox /= 1024, nMultiple++) { sOutput = nApprox.toFixed(3) + " " + aMultiples[nMultiple] + " (" + nBytes + " bytes)"; } return sOutput }
getFileSizeFormat(11111112048) => 10.348 GiB (11111112048 bytes) getFileSizeFormat(1112048) => 1.061 MiB (1112048 bytes)
getFileSizeFormat(11111112048) => 10.348 GiB (11111112048 bytes)
getFileSizeFormat(1112048) => 1.061 MiB (1112048 bytes)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
发现问题
nedtior
时发现通过registerUI
api来注册自定义按钮有问题,所以提了issue阅读学习
浏览器端的文件处理
执行上下文
变量对象
作用域链
Good codes
getFileSizeFormat(11111112048) => 10.348 GiB (11111112048 bytes)
getFileSizeFormat(1112048) => 1.061 MiB (1112048 bytes)
The text was updated successfully, but these errors were encountered: