This module takes care of parsing and validating template input, allowing module developers to focus on core logic. It aims to achieve the same goal as Wikipedia's Module:Arguments but with a different approach:
- Validation is based on a schema that is also used to auto-generate documentation. This guarantees that the documentation is up to date with the validation code.
- No implicit behaviour. If you want to trim a parameter, you specify
trim = true
. If you want to treat empty strings as nil, you specifynilIfEmpty = true
. Module:Arguments does several things "automagically" by default and lacks clarity as a result. - No frame handling. It's up to the caller to consolidate
frame.args
andframe:getParent().args
if needed. This can be done with utilsTable.merge. Most modules typically need only one frame anyway.
Lua error in package.lua at line 80: module 'Module:UtilsArg/Arguments' not found.