local p =
--Helper function that populates the argument list given that user may need to use a mix ofnamed and unnamed parameters. This is relevant because named parameters are notidentical to unnamed parameters due to string trimming, and when dealing with stringswe 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
--Helper Function to interpret boolean stringsfunction p.getBoolean(boolean_str) local boolean_value; if type(boolean_str)
'false' or boolean_str
'0' or boolean_str
'boolean' then boolean_value = boolean_str; else error('No boolean value found'); end return boolean_valueend
function p.defined(frame) local arg = mw.text.trim(frame.args[1]) --if arg
'0' then -- arg = tonumber(arg) --end if mw.ustring.find(arg, '^-?[1-9][0-9]*$') ~= nil then arg = tonumber(arg) elseif arg
return p