Skip to content

formatByteSize

Formats a byte size for a person to read.

Import:

import { formatByteSize } from '@mnaoumov/obsidian-lib/release-asset';

Signature:

function formatByteSize(sizeInBytes: number): string

Parameters:

Parameter Type Description
sizeInBytes number The size in bytes.

Returns: string — The formatted size, such as 12.3 MB.