rangeValidator

function rangeValidator(min, max): (x) => x is number

Creates a validator which tests if the target is a number
and is equal to or between the min and max values.

Parameters

ParameterType
minnumber
maxnumber

Returns

Function

Parameters

ParameterType
xunknown

Returns

x is number