@akashrajpurohit/utils
    Preparing search index...

    Function formatBytes

    • Formats a number of bytes into a human-readable string.

      Parameters

      • bytes: number

        The number of bytes to format.

      • decimals: number = 2

        The number of decimal places to include in the result.

      • output: string = 'binary'

        The output format, either 'binary' or 'decimal'

      Returns string

      A string representing the number of bytes in a human-readable format.