isNum
isNum(
val):boolean
Defined in: core/utils/types.ts:41
Returns true if the value is a number, or can be read as one.
This is !isNaN(val), on purpose: options read from
data-* attributes are strings (data-tooltip="delayTime:500" gives '500'),
and the components validate them with this function. It is therefore true
for numeric strings and also for '', null, true and []. It is not a
type guard for that reason: a true result does not mean typeof val === 'number'.
Parameters
Section titled “Parameters”unknown
Value to test.
Returns
Section titled “Returns”boolean