Module:Data: Difference between revisions

Jump to navigation Jump to search
old>Maltropia
m (1 revision imported)
m (1 revision imported)
 
(One intermediate revision by the same user not shown)
(No difference)

Latest revision as of 17:41, 25 February 2019

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

local mt = {}

function mt.__index(t, k)
	return function(frame)
		local data = mw.loadData(k)
		for _,v in ipairs(frame.args) do
			data = data[v]
		end
		return data
	end
end

return setmetatable({}, mt)