Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Style guide
Special
uploadwizard
Languages
Language links are at the top of the page across from the title.
BTA-Mirror
Search
Search
English
Create account
Log in
Personal tools
Dark mode
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:ProcessArgs/doc
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Get shortened URL
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This module allows arguments to be merged and normalised. This also has the side-effect of making the arguments a real table instead of an empty table with a metatable to access the args. This allows the <code>#</code> operator to work, as well as allowing new values to be added to the table, without being ignored when iterating. The <code>norm</code> function will normalise the arguments passed to it, trimming whitespace and setting empty arguments to <code>nil</code>. If a table isn't passed to the function, it will automatically get the current frame's parent arguments table. The <code>merge</code> function will merge two tables together, overwriting duplicate values from the first table with the second table's value, as well as doing the same as the <code>norm</code> function if the norm parameter is <code>true</code>. If the first parameter isn't a table, it is used as the value for the norm parameter, and it will automatically get the current frame's directly passed arguments table and merge it with the current frame's parent arguments table.
Summary:
Please note that all contributions to BTA-Mirror may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BTA-Mirror:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width