Module:Test

local p = {}

function p.hello(frame) local new_args = p._getParameters( frame.args, {'user'} ); local user = new_args['user'] or ''; return mw.ustring.format("Hello %s ", user) end

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; end return new_args; end

return p