Module:Data/sandbox
< Module:Data
Jump to navigation
Jump to search
Revision as of 02:35, 8 October 2018 by blackwiki>Pppery (Leading module is optional)
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)