Convert a value that represents a valid boolean token into a boolean value, where a
valid boolean token can be any of:
true or "true"
false or "false"
1 or "1"
0 or "0"
If the value passed does not represent any valid token, an Error will be thrown.
Alternatively, to surpress the error and return false instead, pass the silent
parameter with a value of true.
Returns
Returns the boolean value that the token represents
Convert a value that represents a valid boolean token into a boolean value, where a valid boolean token can be any of:
If the value passed does not represent any valid token, an
Error
will be thrown. Alternatively, to surpress the error and return false instead, pass thesilent
parameter with a value oftrue
.Returns
Returns the boolean value that the token represents