• Converts bytes into a human-readable format with size units.

    Parameters

    • bytes: number

      The number of bytes.

    • decimals: number = 2

      The number of decimal places to use.

    Returns string

    Formatted string (e.g., "1.23 MB").