Skip to main content

convertToLargestUnit

Datalayer Core


Datalayer Core / convertToLargestUnit

Function: convertToLargestUnit()

convertToLargestUnit(numBytes, units?): [number, MemoryUnit]

Defined in: tech/datalayer/core/src/utils/Format.ts:38

Given a number of bytes, convert to the most human-readable format, (GB, TB, etc). If "units" is given, convert to that scale

Parameters

numBytes

undefined | number

units?

MemoryUnit

Returns

[number, MemoryUnit]