@apiref-examples/core » utils » bytes functionConverts bytes to a human-readable string with appropriate units (KB, MB, GB, etc.). Signaturesbytes (1/2) functionSignature(bytes: number): stringExamplebytes(1024) // "1 KB" bytes(1048576) // "1 MB" bytes(123456789) // "117.74 MB" ParametersbytesThe number of bytes ReturnsA human-readable string representing the size in appropriate units bytes (2/2) functionSignature(str: string): numberExamplebytes("1 KB") // 1024 bytes("1 MB") // 1048576 bytes("117.74 MB") // 123456789 ParametersstrThe string to convert ReturnsThe number of bytes represented by the string