Module:Yesno/doc

This module provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the  and   boolean values, wikicode templates can only express boolean values through strings such as "yes", "no", etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also accepts other Lua structures as input, i.e. booleans, numbers, tables, and functions. If it is passed input that it does not recognise as boolean, it allows the return of a default value.

Usage
First, load the module.

Some input values always return, and some always return.

String values are converted to lower case before they are matched:

You can specify a default value for input other than the types above. If you don't supply a default, the module will return.

Note that the blank string also functions this way:

Although the blank string usually evaluates to false in wikitext, it evaluates to true in Lua. This module prefers the Lua behaviour over the wikitext behaviour. If treating the blank string as false is important for your module, you will need to remove blank arguments at an earlier stage of processing.