Advertisement:
View source for Module:GetParameters
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function p.getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
000
1:0
Templates used on this page:
- Template:Module other (view source)
- Template:Module rating (view source)
- Template:Ombox (view source)
- Module:Arguments (view source)
- Module:GetParameters/doc (view source)
- Module:Message box (view source)
- Module:Message box/configuration (view source)
- Module:Message box/ombox.css (view source)
- Module:No globals (view source)
- Module:Yesno (view source)
Return to Module:GetParameters.