Logos DX
    Preparing search index...

    Function megabytes

    • Creates a byte size in megabytes.

      WHY: Provides a more readable way to specify sizes in MB.

      Parameters

      • n: number

        number of megabytes

      Returns number

      bytes equivalent

      const uploadLimit = megabytes(10);  // 10 MB upload limit
      const cacheSize = megabytes(50); // 50 MB cache