This is the documentation page for Module:Bool
Converts a case-insensitive string value to a boolean value. Exposes a single function, toboolean
, which accepts a single argument, passes it through tostring
, and returns either a boolean or nil:
- The strings
0
,no
, andfalse
return false. - The strings
1
,yes
, andtrue
return true. - All other values return nil.
This module is the Lua counterpart of Template:Bool.