numberAttribute
function
Transforms a value (typically a string) to a number. Intended to be used as a transform function of an input.
API
Usage Notes
function numberAttribute( value: unknown, fallbackValue?: number): number;
numberAttribute
number
Transforms a value (typically a string) to a number. Intended to be used as a transform function of an input.
@paramvalue
unknown
Value to be transformed.
@paramfallbackValue
number
Value to use if the provided value can't be parsed as a number.
@returns
number
Jump to details