Options
All
  • Public
  • Public/Protected
  • All
Menu

Module background/methods/dataTypes/bytes

Index

Functions

Functions

  • formatBytes(bytes: number, decimals?: number): string
  • It takes a number of bytes and returns a string with the number of bytes formatted in a human-readable way

    Parameters

    • bytes: number

      The number of bytes to format.

    • decimals: number = 2

    Returns string

    A string with the size of the file in bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, zettabytes, or yottabytes.

Generated using TypeDoc version 0.22.15, the 4/20/2022