toBool()

Converts a string or a number to a boolean value.

This function is valid in v2.22.0 to v2.24.3. This function has been downloaded 38 times.

Parameter

{string|number} value
The value to be parsed.

Returns

{boolean}
If value is "false", "no", "off", 0 or the empty string then false will be returned. In all other cases true will be returned.