Jump to content

Module:User:Mr. Stradivarius/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 13:25, 1 February 2018 (add a function to output argument information). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}

function p.main(frame)
	local ret = {}
	for k, v in pairs(args) do
		table.insert(ret, string.format('key: %s', tostring(k)))
		table.insert(ret, string.format('key type: %s', type(k)))
		table.insert(ret, string.format('value: %s', tostring(value)))
	end
	return table.concat(ret, '\n')
end

return p