ant-design-x-vue-next
Version:
Ant Design X for Vue — community continuation aligned with @ant-design/x
16 lines (15 loc) • 315 B
JavaScript
function o(n) {
let t = n;
const e = ["B", "KB", "MB", "GB", "TB", "PB", "EB"];
let i = 0;
for (; t >= 1024 && i < e.length - 1; )
t /= 1024, i++;
return `${t.toFixed(0)} ${e[i]}`;
}
function r(n, t) {
return t.some((e) => n.toLowerCase() === `.${e}`);
}
export {
o as getSize,
r as matchExt
};