Searched refs:unitsIndex (Results 1 – 1 of 1) sorted by relevance
361 let unitsIndex = Math.trunc(Math.log(totalSize) / Math.log(step)); variable362 unitsIndex = unitsIndex > units.length - 1 ? units.length - 1 : unitsIndex;363 const result = totalSize / +units[unitsIndex][1]; constant364 const resultString = totalSize % +units[unitsIndex][1] === 0 ?367 return `${resultString} ${units[unitsIndex][0]}${unit}`;