Function validateBoolean

Returns a boolean corresponding to the given value as follows:

  • null and undefined result in undefined
  • false and "false" result in false
  • "", true and "true" result in true
  • other values throw an error error

Note that an empty string is treated as true.

LisnUsageError If the value is not a valid boolean or boolean string.