Module:User:Benwing2/test-params

This is a private module sandbox of Benwing2, for their own experimentation. Items in this module may be added and removed at Benwing2's discretion; do not rely on this module's stability.


local export = {}

function export.test(frame)
	local params = {
		["g"] = {list = true},
		[1] = {list = "h"},
		["sort"] = {type = "boolean"},
		["clq"] = {type = "boolean"},
		["partclq"] = {type = "boolean", list = "clq", allow_holes = true, require_index = true},
		["cal"] = {alias_of = "clq", type = "boolean"},
		["partcal"] = {alias_of = "partclq", list = "cal", type = "boolean", allow_holes = true, require_index = true},
		["calq"] = {alias_of = "clq", type = "boolean"},
		["partcalq"] = {alias_of = "partclq", list = "calq", type = "boolean"},
		["calque"] = {alias_of = "clq"},
		["partcalque"] = {alias_of = "partclq", list = true, allow_holes = true, require_index = true},
	}
	local args = require("Module:parameters").process(frame:getParent().args, params)
	return mw.dumpObject(args)
	--[=[
	if args["sort"] == true then
		return "true"
	elseif args["sort"] == false then
		return "false"
	elseif args["sort"] == nil then
		return "nil"
	else
		return args["sort"]
	end
	]=]
end

return export