Existsmod
Description
An inexpensive alternative to {{#ifexist}}
Existsmod is an inexpensive alternative to {{#ifexist}} which looks for a given module, and returns one of two values depending on whether it was found.
Syntax [ ]
{{#invoke:Existsmod|main|<module-name>|<value-if-found>|<value-if-missing>}}
return require ( 'Dev:Existsmod' )
{{#invoke:Existsmod |main }}
Template usage:
The template can be used with the following syntax:
{{Existsmod |<...> }}
The Devmodule template can be used to invoke modules from the Dev Wiki repository without installation . There is a brief introduction to Lua templating here .
Example [ ]
Code Output {{#invoke:Existsmod|main|links|found|notfound}} found