Jump to content

Module:Data/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Create sandbox version of Module:Data
(No difference)

Revision as of 02:34, 8 October 2018

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)