Module:require when needed/documentation

Documentation for Module:require when needed. [edit]
This page contains usage information, categories, interwiki links and other content describing the module.

A helper function which can be used in place of require if it's not certain that the module in question will be needed. If the module has already been loaded, then it is simply returned; if it hasn't, then it won't be loaded until it is first used.

This is generally useful when defining variables at the start of a module.