Revision as of 18:33, 16 January 2021 by Celeste(talk | contribs)(Protected "Module:Yesno" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) [Delete=Allow only administrators] (indefinite) [Protect=Allow only administrators] (indefinite)))
Documentation for this module may be created at Module:Yesno/doc
-- Function allowing for consistent treatment of boolean-like wikitext input.-- It works similarly to the template {{yesno}}.returnfunction(val,default)-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you-- should replace "val:lower()" with "mw.ustring.lower(val)" in the-- following line.val=type(val)=='string'andval:lower()orvalifval==nilthenreturnnilelseifval==trueorval=='yes'orval=='y'orval=='true'orval=='t'ortonumber(val)==1thenreturntrueelseifval==falseorval=='no'orval=='n'orval=='false'orval=='f'ortonumber(val)==0thenreturnfalseelsereturndefaultendend
Cookies help us deliver our services. By using our services, you agree to our use of cookies.