Retrieves a number from an environment variable and validates it doesn't exceed a maximum value.
The name of the environment variable
The maximum allowed value
Optional
Optional default number value to use if the environment variable is not set
The number value from the environment variable if it's within the maximum limit
Will throw an error if the value is not a valid number, exceeds the maximum, or if the environment variable is missing and no default is provided
Retrieves a number from an environment variable and validates it doesn't exceed a maximum value.