Module:Data/sandbox
< Module:Data
Jump to navigation
Jump to search
Revision as of 00:51, 6 April 2020 by blackwiki>Pppery (Undid revision 947738882 by 2A01:CB04:4AC:2300:1975:F518:CB7A:FA9 (talk) CLearly not an attempt at sandboxing a change to Module:Data)
Documentation for this module may be created at Module:Data/sandbox/doc
local mt = {}
function mt.__index(t, k)
if string.sub(k, 1, 7) ~= "Module:" then
k = "Module:" .. k
end
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)