Module:Yesno: Difference between revisions
Created page with "-- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki..."
imported>MSGJ (+support for on/off) |
(Created page with "-- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki...") |
||
| Line 14: | Line 14: | ||
or val == 'true' | or val == 'true' | ||
or val == 't' | or val == 't' | ||
or tonumber(val) == 1 | or tonumber(val) == 1 | ||
then | then | ||
| Line 23: | Line 22: | ||
or val == 'false' | or val == 'false' | ||
or val == 'f' | or val == 'f' | ||
or tonumber(val) == 0 | or tonumber(val) == 0 | ||
then | then | ||