Module:debug/track

From Acadēmīa Latīnitātis
Revision as of 04:20, 14 February 2023 by Jācōbus (talk | contribs) (Created page with "return function (key) local frame = mw.getCurrentFrame() if key then if type(key) ~= "table" then key = { key } end for i, value in pairs(key) do pcall(frame.expandTemplate, frame, { title = 'tracking/' .. value }) end else error('No tracking key supplied to the function "' .. track .. '".') end end")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:debug/track/doc

return function (key)
	local frame = mw.getCurrentFrame()
	if key then
		if type(key) ~= "table" then
			key = { key }
		end
		
		for i, value in pairs(key) do
			pcall(frame.expandTemplate, frame, { title = 'tracking/' .. value })
		end
	else
		error('No tracking key supplied to the function "' .. track .. '".')
	end
end