This function takes an input of type string, string[], number, undefined, or null
and converts it to a number. If the input is undefined or null, it returns 0.
If the input is a string or string array, it attempts to convert it to a number.
Parameters
input: undefined|null|string|number|string[]
The input value to be converted. It can be a string, string array, number, undefined, or null.
Returns number
The converted number. If the input is undefined or null, it returns 0.
Converts the given input to a type-safe number.
This function takes an input of type
string,string[],number,undefined, ornulland converts it to a number. If the input isundefinedornull, it returns 0. If the input is a string or string array, it attempts to convert it to a number.