toBool
toBool(
value,fallback):boolean
Defined in: core/utils/options.ts:35
Reads a boolean out of a setting that can be a boolean or the string 'true' or 'false'
(from a data-* attribute).
Parameters
Section titled “Parameters”unknown
The setting.
fallback
Section titled “fallback”boolean
What to use when value is neither.
Returns
Section titled “Returns”boolean
Example
Section titled “Example”toBool('false', true); // falsetoBool('maybe', true); // true