toInt
toInt(
value,fallback):number
Defined in: core/utils/options.ts:16
Reads a whole number out of a setting that can be a number or a string (from a data-* attribute).
Parameters
Section titled “Parameters”unknown
The setting.
fallback
Section titled “fallback”number
What to use when value is not a number.
Returns
Section titled “Returns”number
Example
Section titled “Example”toInt('300', 150); // 300toInt('wide', 150); // 150