Function arrayToBits

  • This function turns an array of Mods into a number that the API server can understand

    Parameters

    • mods: Mods[]

      An array of Mods that will be turned into bits

    Returns null | Mods

    A number representing the Mods, or null if the array is empty

    One useful thing about it is the distinction made between [] (lack of mods) and [Mods.NOMOD]; specifying the nomod mod can alter requests