Module:Paramtest/doc

From Old School Near-Reality Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Paramtest

Information icon-grey.png
This is a documentation subpage for Module:Paramtest.
It contains usage information, categories, and other content that is not part of the original module page.

This module is a helper module to be used by other modules; it may not be designed to be invoked directly. See Near-Reality:Lua/Helper modules for a full list and more information.

ModuleFunctionTypeUse
Paramtestis_empty(arg)StringReturns true if arg is not defined or contains only whitespace
has_content(arg)StringReturns true if arg exists and does not only contain whitespace
default_to(arg1,arg2)String, Any valueIf arg1 exists and does not only contain whitespace, the function returns arg1, otherwise returns arg2
defaults{ {arg1,arg2},...}{String, Any value}...Does the same as default_to() run over every table passed; for technical reasons, all nil are replaced with false