- Preparing search index...
- The search index is not available
moonpiebot
Function convertToIntIfNotUndefined
- convertToIntIfNotUndefined(variableValue: OrUndef<string>, errorMessage?: string): OrUndef<number>
-
Parameters
-
variableValue: OrUndef<string>
-
errorMessage: string = "Could not parse environment variable value string to integer"
Returns OrUndef<number>
Convert number string to integer or throw error if not possible if the input string not undefined.
Returns
Number value if valid number.