Module:User:JeffDoozan/call

local export = {} local rsplit = mw.text.split local rfind = mw.ustring.find

-- borrowed from Module#quote local function process_paramref(paramref) if not paramref then return {} end local params = rsplit(paramref, "%s*,%s*") for i, param in ipairs(params) do		if rfind(param, "^[0-9]+$") then param = tonumber(param) end params[i] = param end return params end

function export.filter(frame) local frame_args = frame.args local parent_args = frame:getParent.args local args = {} local template = frame_args[2]

ignore_params = {} for _, param in ipairs(process_paramref(frame_args[1])) do		ignore_params[param] = {} end

for k, v in pairs(parent_args) do		if ignore_params[k] ~= nil then else args[k] = v       end end for k, v in pairs(frame_args) do		if k == 1 then elseif k == 2 then elseif type(k) == "number" then args[k - 1] = v		else args[k] = v		end end return frame:expandTemplate{title = template, args = args} end

return export